PHP, MySQL, and Volt ( Maybe )
#1

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:
Код:
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
I tried querying that input shown above:
Код:
SET PASSWORD = PASSWORD('your_existing_password')
But its asking for administrative privileges.

Here's how the PHP code looks like:
PHP код:
<?php
    $con 
mysql_connect("host""user""password");
    
mysql_select_db("db");
?>
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)
Reply
#2

Your root password is not ``? I mean blank? I use XAMPP... My brother told me that is better than wamp...
EDIT: or the user that are you using has all the privileges to that database?
Reply
#3

A few things first:

1. @Stefan_Toretto: XAMPP is the follow-up of WAMP and has the more recent versions of PHP, Apache, MySQL etc.
2. WAMP comes with PHPMyAdmin, try to log into there and see if you can change your password there. Also, check that cnf file to see what it does.

I would recommend upgrading to xampp so that you have the most recent version of all services.
Reply
#4

Sorry if i didn't made a clear point, but I'm trying to connect to an external host. Not localhost, thus i have no administrative privileges.
Reply
#5

I wonder if it has anything to do with the external host privileges?

Does your host give you an option to accept external MySQL Connections? It's usually under an option with the MySQL section on cPanel? You should most probably contact your host about it...
Reply
#6

Quote:
Originally Posted by [L3th4l]
Посмотреть сообщение
Sorry if i didn't made a clear point, but I'm trying to connect to an external host. Not localhost, thus i have no administrative privileges.
Some Hosts doesn't allow external connections...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)