MySQL Table Creation Error

v1air80

New Member
Messages
4
Reaction score
0
Points
0
Hi.

I'm getting this error message while trying to create a table in one of my databases.

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'website'@'69.175.6.94' (using password: YES) in /home/oneair/public_html/airline_details.php on line 3
Your have failed to connect


Now, I am 110% sure the username and password are correct and present. And the users are assigned to the correct database and have the correct privileges.

Has anyone got any ideas?

Thanks.
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
Your host should be localhost, and your username is your cpanel username followed by the db username (same goes for database name) (Where my cPanel name is "leafy")

For example, if I had user "test" and database "db":
 

v1air80

New Member
Messages
4
Reaction score
0
Points
0
Thanks for that.

I put localhost in the script but it always displays that IP. I'll give it a shot.

--EDIT--

Just to double check...

connect = mysql_connect("localhost","cpanel name","db name") or die ("Your have failed to connect");

mysql_select_db("vabase");

Just wondering because I thought you had to supply the host (localhost), then the database username and then password.
 
Last edited:
Top