MySQL cannot connect

Status
Not open for further replies.

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
On my site (http://sikuneh.x10hosting.com) all the locations where I use MySQL return the same error: Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/sikuneh/public_html/Submission_lore/inc/m.php on line 15

Can you fix this?

Your dabase username is wrong. It should be like cpanelusername_databaseusername,

You have to create a user for database in mysql databases in cpanel.
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
If you are talking about

http://sikuneh.x10hosting.com/Submission_lore/

the FULL error message is:

Code:
Warning: mysql_query() [function.mysql-query]: Access denied for user 'sikuneh'@'10.1.0.230' (using password: NO) in /home/sikuneh/public_html/Submission_lore/inc/m.php on line 15

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/sikuneh/public_html/Submission_lore/inc/m.php on line 15

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/sikuneh/public_html/Submission_lore/inc/m.php on line 17

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/sikuneh/public_html/Submission_lore/inc/m.php on line 22

Read the first line.
You are not using password. The username is not how x10hosting handles MySQL usernames ( it should be of the form sikuneh_xxxxxxx ).
It looks like the configuration information is not being used when you try to connect to the DB, so the defaults are being used.

If you post the code for m.php (remove any passwords, etc ) maybe we can spot the problem.
 

as4s1n

New Member
Messages
174
Reaction score
4
Points
0
I am sorry. The whole site was working before the change to the new server. It has nothing to do with my information.
 

Zubair

Community Leader
Community Support
Messages
8,766
Reaction score
305
Points
83
I am sorry. The whole site was working before the change to the new server. It has nothing to do with my information.

may be This setting was working before migration but now on new server You have to change these setting to make your site working...
 
Status
Not open for further replies.
Top