Configuring MySQL 5.7 on Ubuntu 18.04 for DTP
With Ubuntu 18.04, they changed how they operate and how packages are installed with apt-get. For one, the MySQL server installation no longer asks for a root password at startup and this will need to be configured in another part. The way MySQL authenticates was changed as well and this too will need to be updated. To configure MySQL 5.7 to be able to use a password to login, which is required to create the Databases for DTP, follow these instructions:
- Run ‘sudo apt install mysql-server’. This will install the MySQl server.
- Once that is finished, run
sudo mysql_secure_installation. You can choose to enable the Validate Password Plugin if you want it isn't required, accept the defaults and put a password. This password can be used in the later steps .
- Once that is done, log into MySQl with the following:
- After you are logged in, run the following command:
ALTER USER [email protected]st IDENTIFIED WITH mysql_native_password BY ‘[ENTER ROOT PASSWORD]’;This will configure MySQL to have the root user login with the specified password, remember this password or write it down as we will need it later.
- After that is configured, run:
- Run the following to verify the changes were made:
SELECT user,authentication_string,plugin,host FROM mysql.user;The output should look similar to the following:
- Once that is completed, test by logging in with the following command and using the password you just set:
mysql -u root -p
- If you were able to login with the set password you are ready to make the databases in DTP.
For an online reference with some more details, please see this link: