简体   繁体   English

如何连接到其他Mysql Server

[英]How to connect to other Mysql Server

I am new to mysql and trying to use another computer to connect the database, hope someone will help me. 我是mysql的新手,正尝试使用另一台计算机连接数据库,希望有人能帮助我。

One computer granted a user name'asb' with a passsword '123' 一台计算机授予用户名“ asb”和密码“ 123”

and went I trid to connect it on another company by using -h 192.168.**.* -u asb -p123; 然后我尝试使用-h 192.168。**。* -u asb -p123将其连接到另一家公司。 it doesn't work 它不起作用

anyone know how to fix it? 谁知道怎么修它?

Have you enabled remote login for 'asb' user. 您是否为“ asb”用户启用了远程登录。

mysql> GRANT ALL ON database.* TO 'asb'@'%' IDENTIFIED BY '123';
mysql> FLUSH PRIVILEGES;

If connection still fails, check bind-address and skip-networking options in /etc/my.cnf or /etc/mysql/my.cnf files. 如果连接仍然失败,请检查/etc/my.cnf或/etc/mysql/my.cnf文件中的bind-address和skip-networking选项。

bind-address option is IP address to bind to. bind-address选项是要绑定的IP地址。

Comment skip-networking option. 注释跳过网络选项。

#skip-networking

Refer here for more info: 请参阅此处以获取更多信息:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM