Connection error to the database server

Status
Not open for further replies.

ryabchikov59

New Member
Messages
12
Reaction score
0
Points
0
I have a following error at connection to the database server:

Warning: mysql_query() [function.mysql-query]: Access denied for user '********'@'10.33.248.75' (using password: NO) in /home/********/public_html/********/index.php on line 7

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/********/public_html/********/index.php on line 7

Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/********/public_html/********/index.php on line 7

Fatal error: Call to a member function assign() on a non-object in /home/********/public_html/********/index.php on line 12

Connection is carried out from a script which located on the subdomain. The script is adjusted correctly. As the database server it is specified localhost. Probably for connection from the subdomain it is required to specify other server?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
I have a following error at connection to the database server:

Warning: mysql_query() [function.mysql-query]: Access denied for user '********'@'10.33.248.75' (using password: NO) in /home/********/public_html/********/index.php on line 7

You are not supplying a password? I would double check the code for making the connection. If your info is stored in another file, make sure you are including it in your main script.
 

ryabchikov59

New Member
Messages
12
Reaction score
0
Points
0
$db_host = 'localhost';
$db_user = '*****';
$db_pass = '*****';


$db = @mysql_connect($db_host, $db_user, $db_pass);
if ($db == false) {
exit('Error: Could not connect to database server.');
}
if (@mysql_select_db('*****', $db) == false) {
exit('Error: Could not select database.');
}
mysql_query('SET charset utf8');
mysql_query('SET names utf8');
mysql_query('SET character_set_client="utf8"');
mysql_query('SET character_set_connection="utf8"');


All files are included.
 

carl6969

Community Support Team
Community Support
Messages
6,874
Reaction score
206
Points
63
Do you mean close this thread?
Has your issue been resolved?
If not, please try to explain more clearly what you are asking now.
 
Status
Not open for further replies.
Top