1

MySql开启远程连接权限

 2 years ago
source link: https://www.isaced.com/post-192.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

MySql开启远程连接权限

Mysql

也做一个小小的记录,今天在windows上用程序连接Mysql连接不上,果然是没开启MySql的远程访问权限。

为什么要开启Mysql的远程链接权限呢?因为我们今天要在自己的非Web程序中连接和使用Mysql。

命令行登陆:

mysql -u root -p

不行的话可以从 MySql.exe 进入,找到Mysql根目录中路径类似:“MySQL\bin\mysql.exe”,这样:

D:\Website\www\MySQL\bin\mysql.exe -u root -p

登陆会提示输入root的密码,如图:

Mysql登陆

输入密码成功后输入以下命令开启远程连接:

grant all privileges on *.* to root@'%' identified by '123';
flush privileges;
exit

注意,分号不能省略!

然后用再Navicat for MySQL什么的一连就OK了,就可以进行远程Mysql软件开发和调试了。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK