1. Download MySQL in Ubuntu Software Center; "Note: MySQL appears to be installed after downloading it."
2. Use the command to check if MySQL is installed:
2.1 Run sudo netstat-tap | grep mysql command to see if there is a MySQL port
2.2 If it is already installed, the following results will appear:
3. If MySQL is already installed, enter mysql-u root-p on the command terminal, start MySQL, and then enter the password to log in to the MySQL database;
4. If you do not set the initial password when you install MySQL, you can set the password by the following command
end MySQL process first, using PS aux | grep mysql command get process ID number, kill ID number, end process
second, run mysqld-- Skip-grant-tables
Then, open a terminal, enter mysql-u root MySQL
after entering, execute update user SET Password=password (' 123456 ') where user= ' Root ';
re-execute, FLUSH privileges;
quit, restart MySQL, and then you run Mysql-u root-p Enter your password, it should be OK
5. After completing the above steps, the next command to enter SQL: Mysql-u root-p, after executing the command, you need to enter the MySQL password: my_password.
The correct steps to install MySQL on Ubuntu