Nov 03 2015 12:13 AM
Try to login manually, if success then follow below link, if fails check and write correct username and password.
you can follow the below steps:
- To grant all access to a new database:
CREATE DATABASE foo_db;
GRANT ALL PRIVILEGES ON foo_db.* to 'user'@'10.1.2.3' IDENTIFIED BY 'pass';
Where 10.1.2.3 is the client address and pass is the password. Replace 10.1.2.3 with % if you want to allow access from any client address.
Note that if you use “foo_db” instead of “foo_db.*” then you will end up granting access to foo_db.foo_db (a table named foo_db in the foo_db database) which generally is not what you want.
To grant read-only access replace “ALL PRIVILEGES” with “SELECT“.
To show what is granted to the current user run “SHOW GRANTS;” .
To show the privs for a particular user run “SHOW GRANTS FOR ‘user’@’10.1.2.3’;”
To show all entries in the user table (user-name, password, and hostname):
SELECT Host,User,Password FROM user;
To do the same thing at the command-line:
echo “SELECT Host,User,Password FROM user;” | mysql mysql
To revoke access:
REVOKE ALL PRIVILEGES ON foo_db.* FROM firstname.lastname@example.org IDENTIFIED BY ‘pass’;
To test a user’s access connect as the user with a command such as the following:
mysql -u user -h 10.1.2.4 -p foo_db
Then test that the user can create tables with the following mysql commands:
CREATE TABLE test (id INT);
DROP TABLE test;