You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Automatic MySQL database setup from .env file contents
About
This script will automatically create a new MySQL database for you by reading your MySQL database name, host name, and user credentials from your .env file. This allows you to keep your database details safe, in a single location. Ideal for deployment and security.
Installation
1. Download setup_mysql.sh to your project root directory
2. You can modify setup_mysql.sh to set the following:
- ENV_FILE (the relative path to your .env file -- e.g. ENV_FILE="./.env.local")
- DEFAULT_MYSQL_HOST (the host name of your MySQL server -- e.g. "localhost")
- DEFAULT_MYSQL_ADMIN_USERNAME (the administrator username of your mysql server -- e.g. "root" (note: this is typically NOT the MySQL username of your app). This should be no longer than 16 characters. Some versions of MySQL allow for longer lengths. You can modify the MAX_MYSQL_USERNAME_LENGTH variable to change this length.
- DEFAULT_MYSQL_ADMIN_PASSWORD (the administrator password of your mysql admin user -- e.g
Automatic MySQL database setup from .env file contents
About
This script will automatically create a new MySQL database for you by reading your MySQL database name, host name, and user credentials from your .env file. This allows you to keep your database details safe, in a single location. Ideal for deployment and security.
Installation
1. Download setup_mysql.sh to your project root directory
2. You can modify setup_mysql.sh to set the following:
- ENV_FILE (the relative path to your .env file -- e.g. ENV_FILE="./.env.local")
- DEFAULT_MYSQL_HOST (the host name of your MySQL server -- e.g. "localhost")
- DEFAULT_MYSQL_ADMIN_USERNAME (the administrator username of your mysql server -- e.g. "root" (note: this is typically NOT the MySQL username of your app). This should be no longer than 16 characters. Some versions of MySQL allow for longer lengths. You can modify the MAX_MYSQL_USERNAME_LENGTH variable to change this length.
- DEFAULT_MYSQL_ADMIN_PASSWORD (the administrator password of your mysql admin user -- e.g