FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Trouble connecting to MySQL





Fenroy
I've been given sub-directory access to someone's site, and I can't connect to the MySQL on the site. Everytime I try, I get the following error:

Warning: mysql_connect(): Access denied for user: 'Fenroy' (Using password: YES) in [edited out] on line 23
Could not connect: Access denied for user: 'Fenroy' (Using password: YES)

Any thoughts?
DSitC
Well, it seems that the database is accessible/reachable for your script, else another error would pop up.

Appears to be a authentication problem. I would suggest you to check your username and password.
ganbate
are you sure you have acces to the server?
it seem's that your user name or pass is wrong.
Fenroy
What should I put as the server parameter? I'm not sure whether or not "localhost" would work in this case.
Roald
Fenroy wrote:
What should I put as the server parameter? I'm not sure whether or not "localhost" would work in this case.
Well if you've got the server on your computer, it is localhost
Fenroy
Roald wrote:
Well if you've got the server on your computer, it is localhost


Actually, I'm now trying to get it to work on my new FriHost site. Newest error is this:

Warning: mysql_connect(): Access denied for user: 'fenroy@localhost' (Using password: YES) in /home/fenroy/domains/livemyth.frih.net/public_html/database.php on line 21
Could not connect: Access denied for user: 'fenroy@localhost' (Using password: YES)
Roald
I don't know what you are doing wrong, but try to reread the code, a stupid little mistake can kill all your work. Confused
DSitC
if you still get the above error message there are not many possible soruces:

- check if the database name is correct
- check if your login is correct
- check if your password is correct

Your db-location localhost is working fine as it seems. Else you would get another, more basic, error.
hexkid
Fenroy wrote:
Actually, I'm now trying to get it to work on my new FriHost site. Newest error is this:

Warning: mysql_connect(): Access denied for user: 'fenroy@localhost' (Using password: YES) in /home/fenroy/domains/livemyth.frih.net/public_html/database.php on line 21
Could not connect: Access denied for user: 'fenroy@localhost' (Using password: YES)


I just went to my DirectAdmin and started to create a database.
The screen that shows up is

so it appears the user name should be "fenroy_<SOMETHING>@localhost".

DSitC wrote:
- check if your login is correct
I couldn't agree more!
NG
try doing this


' Adding database to the username '
' Make the database '
' Check see if you have typed the write details in config/or wotever '
Related topics
What do you think?
down time due to traffic??
Dogs or Cats ?
Error connecting to mysql ; please help
UNSTABLE
Problem connecting to MySQL database with PHP [RESOLVED]
Help Connecting PC to Laptop
FTP Problem
An issue about phpAdmin !!
PHP5 MySQL Config on XP
Database Error: Unable to connect to the database HELP
Halo: Combat Evolved Hosting Issue (PC)
Vista and Brother Wireless Printer
I'm BAAACK!
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.