We open the Xshell and install MySQL via the command as in
Enter these three commands in turn;
sudo apt-get install Mysql-server
sudo apt install mysql-client sudo apt install libmysqlclient-dev
Finish one and get one more. as follows: Enter y after entering the command
Then enter it and install it automatically.
The second and third are similar so input to see prompts to install. During the installation process, you need to set the database password (do not press the number on the right 1234567890 when typing the number on the keyboard, where 0 represents ins, press 1234567890 on the keyboard)
Enter the following command to verify if MySQL was installed successfully.
sudo netstat-tap | grep MySQL
If it appears as if the installation was successful
Turn on MySQL setup journey
(Realize remote control of MySQL)
Now set MySQL to allow remote access, first edit the file/etc/mysql/mysql.conf.d/mysqld.cnf: Edit the configuration file to enter the command
sudo vi/etc/mysql/mysql.conf.d/mysqld.cnf
After entering the configuration file
1. Comment out bind-address = 127.0.0.1:
(How do I annotate it?) , no hurry, listen to me.
Since this is a Linux system,
So the operation is different to US window
We need to move through the keyboard with the up and down keys.
Cursor until found
bind-address = 127.0.0.1 this line,
Then move to the front by the left and right keys of the keyboard.
Then press the INSERT key in the keyboard to toggle edit mode.
Save exit and then go to the MySQL service Execute authorization command:
Enter this command to enter the MySQL service
(The MySQL service environment can be semicolon-terminated with a name and then return)
Mysql-uroot-p your password.
If my mysql-uroot-p123321 appears to be successful in installing MySQL, the next step is to open the Remote Connection database service
Execute the authorization command in the MySQL environment (authorizing the login database to any remote computer):
Enter the following command to open
GRANT all privileges on . To ' root ' @ '% ' identified by ' your password ' with GRANT OPTION;
Refresh configuration information
Enter refresh configuration name after return
Flush privileges;
Quit MySQL Service
Then enter the exit command to exit the MySQL service,
Perform the following command to restart MySQL:
Service MySQL Restart
Finally, we can login through the management database visualization software of our computer.
On our database. The other operation is to follow our local
Database is the same.
Detailed steps for installing MySQL under ubuntu16.04