The correct steps to install MySQL on Ubuntu

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.