[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3079
  • Last Modified:

PHP connecting to MySql Access denied for user 'SYSTEM'@'localhost' (using password: NO)

hi,

i have currently got MySQL 5.1 and Apache 2.2 running PHP 5.0 on Win XP machine.

I am having problems trying to get PHP to connect to MySQL as I everytime I try to connect to MySQL i get the error below. I have been tryign to connect with 'root' and I have set a new password for root but it keeps stating access denied for SYSTEM.

SQL safe mode in effect - ignoring host/user/password information

Access denied for user 'SYSTEM'@'localhost' (using password: NO)

i believe that there must be someone to do with MYSQL?

Cheers
0
Glenhomes
Asked:
Glenhomes
  • 4
  • 2
1 Solution
 
sullivanr6Commented:
This articel is gold. ...and a good read, regading debugging. have you run PHP on this server before, if so this may not be that big a help. but it's worth taking a look at.

http://www.peterguy.com/php/install_IIS6.html 

J
0
 
UmeshMySQL Principle Technical Support EngineerCommented:
Can you post your PHP code which you are using to connect MySQL server..

This error Access denied for user 'SYSTEM'@'localhost' (using password: NO)  tells that you are trying to connect MySQL serevr with user "SYSTEM" and without password....

if you haven't touched your MySQL installation then  you can connect MySQL server with user 'root' and no password..
0
 
GlenhomesAuthor Commented:
i have changed the root password as soon in the code below. I have only just installed and tried to set the code below.


<?php $connection=mysql_connect("localhost","root","MyPass")
or die("Could not connect to MySQL");
echo "Successfully connected to MySQL";
?>
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
UmeshMySQL Principle Technical Support EngineerCommented:
Can you connect MySQL server from command line..... locate mysql/bin directory

run and see if it allow you to connect...and if not wot errors it throws..

mysql -uroot -pMyPass
0
 
GlenhomesAuthor Commented:
I can connect through the commnad line with the same username and passsword as used in the PHP.
0
 
GlenhomesAuthor Commented:
I found that the problem was that I had sql.safe_mode on and I switch it off and it worked.
0
 
GlenhomesAuthor Commented:
sql.safe_mode  in php.ini was set to on and switched to off and worked
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now