# Lets make a secure password for use with MySQL root account.
$ openssl rand -base64 18
$ MROOT=$(openssl rand -base64 18)
$ echo "MySQL Root password is now: $MROOT"
# The following script will prompt you to perform various security-related actions. Follow the prompts to set a root password, remove anonymous users, disallow root login remotely, remove the test database, and reload the privilege tables.
$ sudo mysql_secure_installation
# Change this password SJ6G*WyaV7PvvEts@vxjm used below in a couple of places throughout this tutorial!
# Lets make a secure password for use with MySQL zoombox user account.
$ openssl rand -base64 18
# Lets make a secure password for use with MySQL user account EX zoombox.
$ CMSPWD=$(openssl rand -base64 18)
$ echo "MySQL cms database user account password is now: $CMSPWD"
# Enter your password assigned during setup, create a new user for the app to use.
$ mysql -u root -p
# Lets create a new user account for mysql
$ mysql -u root -p$MROOT
> CREATE USER 'zoombox'@'localhost' IDENTIFIED BY 'SJ6G*WyaV7PvvEts@vxjm';
> GRANT ALL ON cms.* TO 'zoombox'@'localhost';
> create database cms;
@ -73,8 +75,7 @@ $ pwd
# You should be in /var/www/cms/protected/src
# Run as normal user account for mysql program to run safely.
# Do not use the root MySQL user for cms app!
$ mysql -u cms -p cms < tables.sql
enter this password when prompted: SJ6G*WyaV7PvvEts@vxjm