Original works, from the "Blue Blog" blog, Welcome to reprint, please be sure to indicate the following sources, otherwise, the legal responsibility to pursue copyright.
Deep Blue Blog: http://blog.csdn.net/huangyanlong/article/details/44086869
Using MySQL remote connection software (mysql-front), Remote connection error:
[Email protected] ~]# mysql-u [email protected]
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 8
Server version:5.1.66 Source Distribution
Copyright (c), Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
Mysql>quit
To resolve a remote unreachable connection:
[Email protected] ~]# mysql-u root-p
Enter Password:
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 11
Server version:5.1.66 Source Distribution
Copyright (c), Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
mysql> use MySQL;
Reading table information for completion of table and column names
Can turn off this feature to get a quicker startup with-a
Database changed
Mysql> select User,password,host from user;
-- The remote access host needs to be IP Add in
+------+-------------------------------------------+-----------------+
| user | password | Host |
+------+-------------------------------------------+-----------------+
| Root | *81f5e21e35407d884a6cd4a731aebfb6af209e1b | localhost |
| Root | *d997577481b722a2996b58bce11ef3c312ac0b89 | Master.cloudera |
| Root | | 127.0.0.1 |
| | | localhost |
| | | Master.cloudera |
+------+-------------------------------------------+-----------------+
5 rows in Set (0.00 sec)
Mysql> Grant all privileges on * * to [email protected] ' 10.53.105.221 ' identified by ' root ';
-- Give IP address is 10.53.105.221 host has all permissions (including remote access, remote operations permissions)
Query OK, 0 rows affected (0.04 sec)
mysql> flush Privileges;
-- Reload permission Settings
Query OK, 0 rows affected (0.05 sec)
Mysql> select User,password,host from user;
-- query again, IP to be 10.53.105.221 the host has been added to the Host in the file
+------+-------------------------------------------+-----------------+
| user | password | Host |
+------+-------------------------------------------+-----------------+
| Root | *81f5e21e35407d884a6cd4a731aebfb6af209e1b | localhost |
| Root | *d997577481b722a2996b58bce11ef3c312ac0b89 | Master.cloudera |
| Root | | 127.0.0.1 |
| | | localhost |
| | | Master.cloudera |
| Root | *81f5e21e35407d884a6cd4a731aebfb6af209e1b | 10.53.105.221 |
+------+-------------------------------------------+-----------------+
6 rows in Set (0.00 sec)
Remote login again, successfully connected, such as:
Original works, from the "Blue Blog" blog, Welcome to reprint, please be sure to indicate the following sources, otherwise, the legal responsibility to pursue copyright.
Deep Blue Blog: http://blog.csdn.net/huangyanlong/article/details/44086869
Configure remote connection MySQL database