Ubuntu install MySQL

Installing MySQL on Ubuntu is very simple and can be done with just a few commands.

sudo apt-get install mysql-server
apt-get isntall mysql-client
    3.
 sudo apt-get install libmysqlclient-dev

During the installation process, you will be prompted to set a password or something. Be careful not to forget the settings. After the installation is complete, you can use the following command to check whether the installation is successful:

sudo netstat -tap | grep mysql

After checking through the above command, if you see that the mysql socket is in the listen state, the installation is successful.

To log in to the mysql database, use the following command:

mysql -u root -p

-u means to select the user name to log in, -p means the user password to log in, after entering the above command, you will be prompted to enter the password, at this time, you can log in to mysql by entering the password.
Login to MySQL

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325949760&siteId=291194637