Jump to content
MakeWebGames

Conecting?????


mentaljason
 Share

Recommended Posts

Okay i just done sumat and i can't conect to db.

what goes where??

<?php

$c = mysql_connect('localhost', 'myusername', 'mypassword');

mysql_select_db('mydatabase', $c);

$mykey=123456789;

?>

here's my error.......

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'myusername'@'localhost' (using password: YES) in /home/a1100261/public_html/mysql.php on line 2

and

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/a1100261/public_html/mysql.php on line 3

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'myusername'@'localhost' (using password: YES) in /home/a1100261/public_html/mysql.php on line 2

And many more, i think it's the conection. any help???

 

Masked connection details

Link to comment
Share on other sites

Re: Conecting?????

 

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'blah blah'@'localhost' (using password: YES) in /home/a1100261/public_html/mysql.php on line 2

For that one, your password is wrong, or your user name is wrong. Check your cpanel for the correct info.

and

 

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/a1100261/public_html/mysql.php on line 3

 

Fix the thing that's causing the first error, and this one won't be a problem.

Incidentatlly, I doubt your user name is the same as the database name, so that may be incorrect. It is possible though that they are the same. It's not best to do it that way though, hence why I suspect that may be part of your problem.

Double check your info ;)

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...