I changed my root password and now can't connect to MySQL
| From: | Phil Schwarzmann | Date: | Tue, 25 Jun 2002 19:27:45 +0000 |
| Subject: | I changed my root password and now can't connect to MySQL | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-103826@lists.php.net to get a copy of this message | ||
Okay, so I changed my root password using this command....
C:\> C:\mysql\bin\mysql mysql
mysql> DELETE FROM user WHERE Host='localhost' AND User='';
mysql> QUIT
C:\> C:\mysql\bin\mysqladmin reload
C:\> C:\mysql\bin\mysqladmin -u root password my_password
Then I went into my dbconnect.inc file and edited it so it looks like
this...
$mysql_link = mysql_connect('69.69.69.69', 'root', 'my_password')
or die ("Cannot connect to The Database.");
$db = 'test';
mysql_select_db ($db, $mysql_link)
or die ("Could net set database '$db' as the active database.");
Now, whenever my script runs a MySQL command, I get this error....
Warning: MySQL Connection Failed: Access denied for user: 'root@MY_PC'
(Using password: YES) in C:\...\dbconnect.inc on line 3
Cannot connect to The Database.
What am I doing wrong??????
THANKS!!!!!!!