https://store-images.s-microsoft.com/image/apps.54733.f2f3d084-2033-416a-94aa-0d4241024b0b.8f1885da-ee12-4f71-b959-97be70b7c873.8bc2d07a-6f72-4a4d-9b08-263f25e9bfef

MySQL on Ubuntu 20.04 LTS

Ntegral Inc.

(1 vurderinger)

MySQL on Ubuntu 20.04 LTS

Ntegral Inc.

(1 vurderinger)

MySQL on Ubuntu 20.04 LTS by Ntegral Inc.

MySQL on Ubuntu 20.04 LTS

MySQL is the most popular open source relational database management system. It is a database specifically targeted for enterprise-scale applications on Azure.

In order to use MySQL, ssh to the newly created VM.,

Note: The port to connect to MySQL is not opened by default! Also, We did not create the default password. SECURITY IS IMPORTANT TO US

Verify that MySQL is running by typing: sudo systemctl status mysql

Secure the MySQL instance by typing the following: sudo mysql_secure_installation

You will be asked to configure the VALIDATE PASSWORD PLUGIN which is used to test the strength of the MySQL users' passwords and improve the security:

Securing the MySQL server deployment. Connecting to MySQL using a blank password. VALIDATE PASSWORD COMPONENT can be used to test passwords and improve security. It checks the strength of password and allows the users to set only those passwords which are secure enough. Would you like to setup VALIDATE PASSWORD component? Press y|Y for Yes, any other key for No: y

There are three levels of password validation policy, low, medium, and strong. Press y if you want to set up the validate password plugin or any other key to move to the next step:

There are three levels of password validation policy: LOW Length >= 8 MEDIUM Length >= 8, numeric, mixed case, and special characters STRONG Length >= 8, numeric, mixed case, special characters and dictionary file Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2

On the next prompt, you will be asked to set a password for the MySQL root user:

Please set the password for root here. New password: Re-enter new password:

If you set up the validate password plugin, the script will show you the strength of your new password. Type y to confirm the password:

Estimated strength of the password: 50 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y

Next, you’ll be asked to remove the anonymous user, restrict root user access to the local machine, remove the test database, and reload privilege tables. You should answer y to all questions.

To log in to the MySQL server as the root user type: sudo mysql

If you want to login to your MySQL server as root using an external program such as phpMyAdmin, you have two options. The first one is to change the authentication method from auth_socket to mysql_native_password. You can do that by running the following command:

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'very_strong_password'; mysql> FLUSH PRIVILEGES;

The second, recommended option is to create a new dedicated administrative user with access to all databases

mysql> GRANT ALL PRIVILEGES ON *.* TO 'administrator'@'localhost' IDENTIFIED BY 'very_strong_password';