Wednesday, August 20, 2008

How to Grant Permission to Remote Access in MySQL

If you are using Client Server architecture with MySQL database,you cant directly access MySQL database which is in the server.

To Access MySQL Database thought the network,you have to grant the permission to each database.to do that you have to follow following steps.

Ex :- Create a database "WSO2"

1. Open MySQL Command Prompt

2. Type Following Command to grant usage permission to access MySQL

Syntax -

mysql> GRANT USAGE ON *.* TO username@[Client_IP] IDENTIFIED BY 'password';

Ex :-

mysql> GRANT USAGE ON *.* TO Chamara@10.100.1.149 IDENTIFIED BY 'chamara123';

3. Then Type following command to Grant database Permission

Syntax -

GRANT ALL PRIVILEGES ON database_name.* TO username@[Client_IP];

Ex :-

GRANT ALL PRIVILEGES ON WSO2.* TO chamara@10.100.1.149;

Now you can access WSO2 Database from anywhere.

4 comments:

Benzin said...

Remote access has indeed scaled greater heights as a communication technology. The Technology continues to evolve with vendors introducing innovative solutions. RHUB http://www.rhubcom.com seems to have set a trend with its pioneer 4-in-1 Remote Access appliance, incorporating 4 complete collaboration technologies – remote access, remote support, web conferencing, and webinar – in a single system.

lahiru said...

Thanks chamara was very useful for granting access to already created databases ! if we create a new database it will work fine once we do granting but for old databases GRANT ALL ON foo.* TO bar@'162.54.10.20' IDENTIFIED BY 'PASSWORD'; didn't worked for me. but GRANT USAGE worked !


Lahiru

Malintha Adikari said...

Hi,

Thank you very much for the post. This works fine for me after disabling firewall.

Malintha

Computine LTD said...

Computine Ltd is an esteemed organization which synonyms to London IT service providers. It is founded in 2014. We are very responsible and dedicated to new technological changes. We are known as Network Support London, Application Development London,Mobile Development London,Cisco Network Services London providers.