0

I use mysql in vm1 host which ip is:10.104.xx.xx. I can log in DB successfully like is:

mysql  -uStack -pqwerasdf##123 hpcusers;

and the grants of Stack user is:

show grants for Stack@'%';

the result:

+--------------------------------------------------------------+
| Grants for Stack@%                                           |
+--------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'xiezy'@'%' WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON `hpcusers`.* TO 'xiezy'@'%'          |
+--------------------------------------------------------------+
2 rows in set (0.00 sec)

Now I want to log in DB from remote vm2 host. I use:

mysql -h10.104.xx.xx -uStack -pqwerasdf##123 hpcusers    

But it is unlucky, I am fail, the result is:

Warning: Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on '10.104.xx.xx' (110)

The mysql version in vm1 host is

Server version: 5.6.25-73.1 Percona Server (GPL), Release 73.1, Revision 07b797f

The mysql version in vm2 host is:

Server version: 5.7.24-log MySQL Community Server (GPL)

At the same time, I can

ping 10.104.xx.xx

successfully in vm2 host. and I can log in vm1 successfully

ssh root@10.104.xx.xx

Who can help me? Why I can't remote log in DB ?

stack
  • 821
  • 1
  • 15
  • 28

0 Answers0