MyBB Community Forums

Full Version: How does this work...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am working on an application that needs to access a remote database. It says access denied for user [email protected] - I know I can fix this by changing the access levels, but how do programs like phpMyAdmin (on a remote server) and HeidiSQL work? Huh

Thanks Smile
Don't know why this doubled. Please delete Smile
Those programs are usually installed on the same server that hosts the mysql, and usually @localhost has access. If the mysql is on a remote server then usually the host sets it up for remote access by default.
HeidiSQL is a Windows-based program. It has worked with every database I've thrown at it
Did you allow remote connections to the database server and open port 3306 on the database server firewall?
I plan on releasing this software (it's actually an update for InstallMyBB). Most people won't want to do that.
Well you can't have access to a remote database in less the server the database is hosted on allows it. There is just no way around it.
Are you using cpanel or direct admin? If so, go into mysql and add an allowed "access host" (da) "remote host" (cp) and put it as "%" ( a percent sign) this us a wildcard so it will accept connections from any IP Smile
Someone download HeidiSQL...
(2010-11-09, 07:56 PM)Zack Magee Wrote: [ -> ]Someone download HeidiSQL...

I just downloaded and installed heidisql and tried to connect to a remote database using a user that had only local access...denied! I re-tried with a user that had remote access (%) and it was allowed.

This is how it is supposed to be, if there was a way to globally access databases that do not have user's allowed to connect from remote that would be a huge security risk! There is absolutely no way to access a database using a user account that does not have remote access enabled!

For your application, you can add a check to make sure that the user account that your users use to connect to the database have remote access enabled, of not then show them an error and how to fix it.