Unable to establish a connection with DB using HeidiSQL
| User, date | Message |
|---|---|
|
Written by rishi_mahajan
4 years ago Category: Creating a connection 8 posts since Fri, 30 Oct 09 |
Hello All.. I am using HeidiSQL for making a connection to my online DB. The problem is this, It shows an error in alert box :- Could not establish connection! Details. SQL Error! Access denied for user '*********'@'*********' (Some username and password) (using password:yes) I know that my username and password is valid and correct. But still no luck.. :( One more thing that when i make connection with DB at(http://localhost/phpmyadmin/, XAMPP) on my local machine it connects successfully. But when try to make connection online it prompts error message. Additional Info. (I am using Port:3306 and Session: Shivbaba Infotech for online connection with DB). Any help will be appreciated... regards Rishi |
|
Written by rishi_mahajan
4 years ago 8 posts since Fri, 30 Oct 09 |
Hello All.. I am using HeidiSQL for making a connection to my online DB. The problem is this, It shows an error in alert box :- Could not establish connection! Details. SQL Error! Access denied for user '*********'@'*********' (Some username and password) using password:yes I know that my username and password is valid and correct. But still no luck.. :( One more thing that when i make connection with DB at(http://localhost/phpmyadmin/, XAMPP) on my local machine it connects successfully. But when try to make connection online it prompts error message. Additional Info. (I am using Port:3306 and Session: Shivbaba Infotech for online connection with DB). Any help will be appreciated... regards Rishi |
|
Written by ramsore
4 years ago 2 posts since Fri, 30 Oct 09 |
You must understand MySQL security First: root@% mean a user from any machine root@localhost mean a user from localhost root@othermachine mean a user from othermachine so when you get: Access denied for user 'root@othermachine' using password:yes check privileges using phpmyadmin if user root@othermachine or root@% exist if don“t you must create user exactly as shown. This solution apply to all clients not only to HeidiSQL. I hope this can help you... |
|
Written by rishi_mahajan
4 years ago 8 posts since Fri, 30 Oct 09 |
Thanks for Replying... Can you please explain me, when HeidiSQL connection window for DB is open which username/password is to use. Will it be of FTP or will it be of Database username/password.? I am sure that it will be of Database username/password. Can you please confirm. I am little confused. Thanks in advance... |
|
Written by ansgar
4 years ago 3958 posts since Fri, 07 Apr 06 |
Sure it's the database user/pass. |
|
Written by rishi_mahajan
4 years ago 8 posts since Fri, 30 Oct 09 |
Hi, thanks for replying. But i didn't understand one thing if i am putting all the valid DB connection details. Then why its prompting me following:- Sql Error: Access denied for the user 'Username''@''My System IP Address' (Using Password: Yes) What is wrong in it. I am 101% sure that my DB details are perfect. But still unable to connect DB using HeidiSQL. Do i need to set some of PHPMyadmin Settings.? Needed Help. Thanks in Advance.. |
|
Written by rishi_mahajan
4 years ago 8 posts since Fri, 30 Oct 09 |
Some details i am providing which i am using to make DB connection:- Session: Shivbaba Infotech (Can i use any name.?) Hostname/Ip: http://www.shivbabainfotech.com/ Username : Any Username (Of DB) Password : Any Password (Of DB) Port : 3306 Database : Any Database Name Please prompt me if i am putting any invalid information. |
|
Written by ramsore
4 years ago 2 posts since Fri, 30 Oct 09 |
PHPMyadmin is another mysql client, normally installed on same machine where mysql is running. So you can login without problems. What I said before is that using phpmyadmin to check privileges of 'Username''@''My System IP Address' if don't exist you must create that user an carefully set same password. |
|
Written by ansgar
4 years ago 3958 posts since Fri, 07 Apr 06 |
rishi_mahajan wrote: Session: Shivbaba Infotech (Can i use any name.?) Sure, any name is fine, doesn't matter too much, as it's just the folder name in your registry where stuff is saved.rishi_mahajan wrote: Hostname/Ip: http://www.shivbabainfotech.com/ That's not a valid hostname - remove that http please.rishi_mahajan wrote: Username : Any Username (Of DB) As ramsore says: PHPmyadmin normally does not run on your localhost, so you probably need a different username/password which is allowed to connect from your client IP address. |
|
Written by ectimo
4 years ago 9 posts since Wed, 04 Nov 09 |
Buddy, i am not sure if I am too late, but this is what you need to do. Go to phpMyAdmin and do this select host, user from mysql.user; most likely you will get something like this: +-----------------------+------------+ | host | user | +-----------------------+------------+ | % | someuser | | 127.0.0.1 | root | | BIHAC | root | | localhost | root | +-----------------------+------------+ 4 rows in set (0.00 sec) well the % sign means ANY MACHINE (IP ADDRESS) so if you have no users with % as a host, then you cannot connect to that server. If that is the case, then do following: create user 'heidi'@'%' identified by 'heidiPassword'; grant all on *.* to 'heidi'@'%'; With this user you can connect from any host (computer). More on this: http://dev.mysql.com/doc/refman/5.1/en/adding-users.html |
|
Written by ectimo
4 years ago 9 posts since Wed, 04 Nov 09 |
Please disregard the line: | BIHAC | root | BIHAC is the name of my server!!! |
|
Written by rishi_mahajan
4 years ago 8 posts since Fri, 30 Oct 09 |
Okk, and thanks for replying. I will run the above Mysql Queries at home. Because right now i am in office. |
|
Written by ectimo
4 years ago 9 posts since Wed, 04 Nov 09 |
Well, any good??? |
|
Written by rishi_mahajan
4 years ago 8 posts since Fri, 30 Oct 09 |
Yes Yes i am here. Thanks buddy this works as wonder. Really now i get the access of My DB through HeidiSQL. I executed the above quries and it creates me new username with all the required permissions. Now i understand what you guys were saying to me... :D Great Job And Big Thanks To All Of You And Please Don't Go Anywhere. I will need your help for other features of HeidiSQL. Big Thanks Again... |
|
Written by ectimo
4 years ago 9 posts since Wed, 04 Nov 09 |
Well, any good??? |
|
Written by ectimo
4 years ago 9 posts since Wed, 04 Nov 09 |
I am sorry for repeated: Well, any good??? This morning I just refreshed the page, and it appeared again... I am glad it worked OK, in the begginging I had the same problem, and I resolved it this way... The answers I used to get were quite often similar to: *It doesn't work on remote machines!!! *It doesn't work if the MySQL server is on Linux!!! *It doesn't work ... So I decided to prove them all wrong, and made it work, also I remembered what I did (of course, I shortened it to only needed steps) and you got your answer. I hope many others did as well... Peace 'n' God bless! |
|
Written by ansgar
4 years ago 3958 posts since Fri, 07 Apr 06 |
That refresh problem should be fixed now, you'll be redirected after posting something. |
|
Written by rishi_mahajan
4 years ago 8 posts since Fri, 30 Oct 09 |
Yes, Your post will really be helpful for many other guys suffering from the same issue. |
|
Please login to leave a reply, or register at first. |