Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysql password help 1

Status
Not open for further replies.

dzon

IS-IT--Management
May 26, 2005
103
GB
Hi,

When I launch phpmyadmin I can see a message at the bottom of the page which says :

"Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole."

So I went into cli mode and changed the root password.(SET PASSWORD FOR root@localhost=PASSWORD('rubberchicken');)

When I went into my moodle site I recieved a database error. I had made sure that I amended the config.php file to reflect the password change but to no avail. I then changed the password back to "blank" and everything works again.

I have created a test connect page to rule out my application and it does not connect:

<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'rubberchicken';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');

$dbname = 'moodle';
mysql_select_db($dbname);
?>

I then change the password back to "blank" in my config file and mysql and everything works fine:

mysql> set password for root@localhost=password('');

I am really stumped. I have restarted mysql and apache each time and flushed privileges.

I would really be gratefull if somebody could explain how to correct this.

thanks in nadvance

Dzon

 
Thanks. that did the trick!

Cheers,

Dzon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top