Install MySQL on Ubuntu
1. Check if MySQL is installed on Ubuntu
sudo netstat-tap | grep MySQL
MySQL is not installed on this machine
2. Install MySQL server side and client
Command: sudo apt-get install mysql-server mysql-client
During installation, you will be prompted to set the password for the database root user, not the Ubuntu administrator password
Indicates the installation is complete!
We are verifying that the machine has MySQL installed, the result is as follows
3. Log in to MySQL for testing
Enter the command mysql-u root-p, prompt for password, u to choose Login Username,-p indicates login user password
Indicates that we have entered MySQL.
4. Using SQL for validation
Command: show databases;
Summary: Just use to download mysql when there is a network, and compile MySQL for installation, here is not introduced. This approach is the simplest way.
2016030205-ubuntu installing MySQL