How to install mysql on the server: first download and install xshell; then enter the root password on the pop-up page, and use [mysql -u root -p password] to enter the database; then enter the current folder to make modifications; finally Just exit and restart.
How to install mysql on the server:
1. Tools used: xshell (download from the official website) , the purpose is to use the Linux system to operate your server. Just enter various commands, the speed is very fast
2. Pretend that your server has installed the http reverse proxy server nginx, and install the mysql database in the server
3. The key point begins, The following explains step by step how to install mysql and set up remote connection
1. apt-get install mysql-server mysql-client -y
2. A pop-up page will appear and enter the root password:
3. Repeat password
4. Command line mysql -u root -p password
5. Enter database
6 , enter the current folder
7. Modify the current file in the current folder (enter this file: vim mysqld.cnf)
8. Enter the file to modify and find this line (keyboard control cursor), comment it out (the way to comment is to add a # in front), and save it after the change (enter ":wq" directly)
9. Enter mysql from the command line
10. Enter: grant all on *.* to root@'%' identified by 'jgx13245' with grant option;
11. Enter: flush privileges;
12.Exit. Restart mysql (/etc/init.d/mysql restart)
13. If any of the above keys are pressed incorrectly, enter: q! (Exit without saving, try again)
14. Connect in the upper left corner of navicat, fill in the IP of your server, and the connection is successful
More related free learning recommendations :mysql tutorial(Video)
The above is the detailed content of How to install mysql on the server. For more information, please follow other related articles on the PHP Chinese website!