

However, as of this writing the script will return the following error after you enter and confirm a password:

Prior to July 2022, this script would silently fail after attempting to set the root account password and continue on with the rest of the prompts. The reason is that this script will attempt to set a password for the installation’s root MySQL account but, by default on Ubuntu installations, this account is not configured to connect using a Warning: As of July 2022, an error will occur when you run the mysql_secure_installation script without some further configuration. This script changes some of the less secure default options for things like remote root logins and sample users. Step 2 - Configuring MySQLįor fresh installations of MySQL, you’ll want to run the DBMS’s Because this leaves your installation of MySQL insecure, we will address this next. These commands will install and start MySQL, but will not prompt you to set a password or make any other configuration changes. To install it, update the package index on your server if you’ve notĮnsure that the server is running using the systemctl start command: At the time of this writing, the version of MySQL available in the default Ubuntu repository is version 8.0.27. On Ubuntu 20.04, you can install MySQL using the APT package repository. Initial server setup guide for Ubuntu 20.04.

Step 3 - Creating a Dedicated MySQL User and Granting Privileges.
