Click here to Skip to main content
15,847,653 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I Am Creating a Web Application to Attach a remote database of Mysql for which i have used a
Mysql Connector but When i am Running a application using given user id and password of database it Showing an error :"Access denied for user 'parkhya_parkhya'@'rws5.my-hosting-panel.com' (using password: YES) "

I tried a lot but still not finding any Solution to attache a database so Please Reply me Why
I am Facing this Problem. and What i do Solve this Problem in My Web Application.
Posted
Comments
[no name] 28-Mar-13 9:24am    
There might be something wrong with your keyboard. It is randomly Placing Capitol letters where It does not Need To.
The error is pretty clear is it not? Either the user ID is incorrect or the password is incorrect or both that you are passing to that database. Pass the correct credentials to the database is your solution.
ZurdoDev 28-Mar-13 9:31am    
The error tells you the issue.
[no name] 28-Mar-13 9:35am    
Additionally if you are trying to connect to a remote database that is hosted by a provider, they may not allow you to directly connect to the database for security.

1 solution

Hello,

By default MySQL does not allow connections from remote machines. You will have to enable this. Open command prompt on the machine on which you have installed MySQL. The type in following command to grant the necessary privileges to the user.
GRANT ALL ON YOURDB.* TO 'parkhya_parkhya'@'rws5.my-hosting-panel.com' IDENTIFIED BY 'USER PASSWORD';
You can also GRANT specific privileges to the USER instead of ALL. Please have a look at MySQL Manual[^].

I am assuming that rws5.my-hosting-panel.com is the FQDN of the machine from where you are trying to establish the connection. You can even use IP Address, if name resolution is not working.

Regards,
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900