View Full Version : An error occured while connecting to the database.
phlox
02-11-2006, 11:26 PM
An error occured while connecting to the database. Please check your database username and password.
If you require help with your database server settings, please consult your hosting company.
The database server returned the following message:
Access denied for xxx (using password: YES)
Could you please tell me what i might be doing wrong>?
Thanks you guys!! :)
Kevuk2k
02-11-2006, 11:41 PM
This might sound stupid but have you allocated a username and password to the database you intend using. make sure that it looks like this.... In other words it shows there is actually a user there, this is easily overlooked as many hosts provide for many mysql accounts and you might not have allowed the correct user to the correct database. Just make a new user and add that.... It should work then.
Users in directory
xxxxxx_xxxxxxx (Privileges: ALL PRIVILEGES)
Connection Strings
Perl $dbh = DBI->connect("DBI:mysql:theorang_directory:localhost","xxxxxx_xxxxxxx","<PASSWORD HERE>");
PHP $dbh=mysql_connect ("localhost", "xxxxxx_xxxxxxx", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("the_directory");
Kev
phlox
02-12-2006, 06:00 AM
user was created w/full access before,so i deleted it and created a new one and i got the same error message :roll:
please advice
Cordially
David
02-12-2006, 06:11 AM
Is the database on the same server/ip as your site?
Create a new file called something like check.php and put this code in it:
Content visible to registered users only.
This will bypass anything related to phpLD and check to see if you can connect.
seohyderabad
05-12-2006, 05:06 PM
HI david i tried this method and it showed mr this
Warning: mysql_connect(): Unknown MySQL Server Host 'localhost or ip address' (1) in /home/seohyd/public_html/directory/check.php on line 7 Could not connect
Please tell me how to find my database server name.
Thanks
David
05-12-2006, 06:29 PM
Typically, when you create a database, there is information given to you during the creation.
You may need to check with your host. They would definitely know.
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.