You need to grant access to the IP Address from which you are trying to access MySQL. To do this, open a Terminal at your Linux Server, access mysql by command line and do that.
[javauser@thanatos ~]$ /opt/lampp/bin/mysql -u root -h localhost
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.6.16 Source distribution
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cdcol |
| mysql |
| performance_schema |
| phpmyadmin |
| test |
+--------------------+
6 rows in set (0.00 sec)
mysql> create database javauser;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL ON javauser.* TO 'root'@'10.80.122.16' IDENTIFIED BY 'my_root_password';
Query OK, 0 rows affected (0.00 sec)
mysql>
Now, everything works fine !!!


No comments:
Post a Comment