Last active
January 15, 2019 02:01
-
-
Save xiaoysh8/8d6c57e1f976daa50310576ee5b46606 to your computer and use it in GitHub Desktop.
mysql remote access
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION; | |
FLUSH PRIVILEGES; | |
Out of the box, MySQL will only allow access from the localhost address 127.0.0.1. To change this, you need to open the /etc/mysql/mysql.conf.d/mysqld.cnf file and change the line: | |
2 bind-address = 127.0.0.1 | |
to | |
#bind-address = 127.0.0.1 | |
//下载 | |
ssh [email protected] mysqldump -uapi_njges_com -pXr2F7A5JyEJXtmKd api_njges_com | mysql -uroot -psecret green |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment