PDA

View Full Version : Connecting to my Database



sackmanjay
09-30-2008, 02:06 PM
Hello, I have been trying to connect to my database (Mysql) using Namo Webeditor so that I can insert data directly into my web pages. I have tried using Microsoft ODBC to configure the USER DSN but the info given won't allow to connect to the database. I use local host, user name, user password etc ...still no luck.

Has anyone used this method to connect to their mysql? I have tried bluehost support with no luck.

Thanks

felgall
09-30-2008, 02:59 PM
You can't use localhost if the database is on a different computer. You need to use the domain name of the site to connect to a remote database and your local ip address needs to be whitelisted.

sackmanjay
10-01-2008, 04:59 AM
Thanks. Though it was my host provider that told me to use localhost. But what you say makes sense. I'll give it a try.

felgall
10-01-2008, 01:19 PM
localhost identifies the database as being on the same computer as the script trying to access it - which is usually the case both for the live version on your hosting and any test version that you have running independently on your own computer. It is only where you want scripts to access a database on a different computer that you change it from localhost to the domain name on the computer where the copy of the database you want to access is located.

sackmanjay
10-01-2008, 05:07 PM
Well then since you have more of a help then I have expected please look at this screen shot and tell me what I am doing wrong.

http://www.pbanjcollectibles.com/images/dberror.jpg

This is the latest error.

Thanks

wysiwyg
10-01-2008, 06:14 PM
What does Diagnostics say the error is?

sackmanjay
10-01-2008, 06:18 PM
[MySQL][ODBC 3.51 Driver]Access denied for user 'pbanjcol_Jconnor'@'%' to database 'pbanjcol_PbanjProducts'

sackmanjay
10-01-2008, 06:47 PM
Will be out of town will check posts later. Thanks all

DietrichVC
10-02-2008, 05:44 PM
Make sure you have whitelisted your own IP address in the remote MySQl section of Cpanel. If that does not do it, call BH and have then whitelist the IP from their end.

wysiwyg
10-02-2008, 05:48 PM
Well the error either means that particular user doesn't exist or hasn't been added to that database with the neceessary privelages.

Try using your cPanel login to connect to the database and see what happens.

sackmanjay
10-08-2008, 11:06 AM
Well, I am finally back from New Orleans...I can get into the DB from the CPanel just fine. I have checked the IP is whitelisted.
Perhaps a call might work, whats the best number?

Early Out
10-08-2008, 11:17 AM
888-401-host (4678)

sackmanjay
10-08-2008, 11:49 AM
Thanks, I'll give them a call.