简体   繁体   中英

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.

One computer granted a user name'asb' with a passsword '123'

and went I trid to connect it on another company by using -h 192.168.**.* -u asb -p123; it doesn't work

anyone know how to fix it?

Have you enabled remote login for 'asb' user.

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.

bind-address option is IP address to bind to.

Comment skip-networking option.

#skip-networking

Refer here for more info:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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