13.03.2011, 22:03
Ok, so I'm using wamp for testing. I started using PHP to create a stats page. The problem is, that when I try to connect the PHP site to the MySQL host, it gives an error about an "Insecure" password.
Error:
I tried querying that input shown above:
But its asking for administrative privileges.
Here's how the PHP code looks like:
I didn't try opening a support ticket, don't think its that necessary, thought i was doing something wrong. Anyways, I'll be glad if someone helps me resolve this. Thanks.
(Btw, yes i ******d the problem. Most of the answers are about the above input that i showed)
Error:
Код:
mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file in C:\wamp\www\database.php on line 2
Код:
SET PASSWORD = PASSWORD('your_existing_password')
Here's how the PHP code looks like:
PHP код:
<?php
$con = mysql_connect("host", "user", "password");
mysql_select_db("db");
?>
(Btw, yes i ******d the problem. Most of the answers are about the above input that i showed)