select User,Host from mysql.user;
SHOW GRANTS FOR CURRENT_USER;
Setup to connect remotely
mysql> GRANT ALL ON fooDatabase.* TO [email protected]’184.108.40.206′ IDENTIFIED BY ‘my_password’;
This statement will grant ALL permissions to the newly created user fooUser with a password of ‘my_password’ when they connect from the IP address 220.127.116.11.
Now you can test your connection remotely. You can access your MySQL server from another Linux server:
# mysql -u fooUser -p -h 18.104.22.168
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 5.0.45 Source distribution
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.