Home  >  Article  >  Database  >  How to install mysql on the server

How to install mysql on the server

coldplay.xixi
coldplay.xixiOriginal
2020-10-20 14:26:525871browse

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

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:

How to install mysql on the server

3. Repeat password

4. Command line mysql -u root -p password

5. Enter database

6 , enter the current folder

How to install mysql on the server

7. Modify the current file in the current folder (enter this file: vim mysqld.cnf)

How to install mysql on the server

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)

How to install mysql on the server

9. Enter mysql from the command line

How to install mysql on the server

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)

How to install mysql on the server

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn