1. Install mysql-server
sudo apt-get install mysql-server
Type y and press Enter. wait for download, install
The following figure appears, you need to set the Mysql password.
Enter the password, press Enter, a confirmation dialog box pops up,
Enter the password again. Follow the installation. The installation will be completed automatically.
2. Install mysql-client
sudo apt-get install mysql-client
3.安装 libmysqlclient-dev
sudo apt-get install libmysqlclient-dev
Type y and press Enter.
4. Check if the installation is successful
sudo netstat -tap | grep mysql
The above message appears, indicating that the installation was successful.
5. Enter mysql to view
mysql -u root -p password
quit
\q