Solved

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

Posted on 2008-10-31
7
2,983 Views
Last Modified: 2013-12-13
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
Comment
Question by:Glenhomes
  • 4
  • 2
7 Comments
 
LVL 3

Expert Comment

by:sullivanr6
ID: 22851851
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
 
LVL 26

Expert Comment

by:ushastry
ID: 22852577
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
 

Author Comment

by:Glenhomes
ID: 22853033
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
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
LVL 26

Expert Comment

by:ushastry
ID: 22853131
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
 

Author Comment

by:Glenhomes
ID: 22854093
I can connect through the commnad line with the same username and passsword as used in the PHP.
0
 

Author Comment

by:Glenhomes
ID: 22858635
I found that the problem was that I had sql.safe_mode on and I switch it off and it worked.
0
 

Accepted Solution

by:
Glenhomes earned 0 total points
ID: 22858640
sql.safe_mode  in php.ini was set to on and switched to off and worked
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now