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'@'' (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.
[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


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.
You can also GRANT specific privileges to the USER instead of ALL. Please have a look at MySQL Manual[^].

I am assuming that 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.

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