Jump to content

[SOLVED] need help in mysql_connect()


doforumda

Recommended Posts

hi

 

i have problem using mysql_connect() function. when i use my site on my local computer then it works perfectly but when i upload my site to server then it displays this error

Warning: mysql_connect() [function.mysql-pconnect]: Access denied for user 'msaleem'@'localhost' (using password: YES) in /............./portfolio.php on line 26

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /......../portfolio.php on line 27

Warning: mysql_query() [function.mysql-query]: Access denied for user 'linuxgr1'@'localhost' (using password: NO) in /.........../portfolio.php on line 29

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /........./portfolio.php on line 29

 

i am using localhost in mysql_connect() function. i think this is causing the problem. can anyone tell how can i fix this problem. i mean if this is causing the problem then what should i write instead of localhost?

Link to comment
https://forums.phpfreaks.com/topic/181230-solved-need-help-in-mysql_connect/
Share on other sites

hi

 

i have problem using mysql_connect() function. when i use my site on my local computer then it works perfectly but when i upload my site to server then it displays this error

Warning: mysql_connect() [function.mysql-pconnect]: Access denied for user 'msaleem'@'localhost' (using password: YES) in /............./portfolio.php on line 26

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /......../portfolio.php on line 27

Warning: mysql_query() [function.mysql-query]: Access denied for user 'linuxgr1'@'localhost' (using password: NO) in /.........../portfolio.php on line 29

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /........./portfolio.php on line 29

 

i am using localhost in mysql_connect() function. i think this is causing the problem. can anyone tell how can i fix this problem. i mean if this is causing the problem then what should i write instead of localhost?

 

Localhost is fine, try posting your code.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.