Until now I have been running my php code to connect to mysql using "admin" and my admin password.
Example:
Code: Select all
$conn = mysql_connect("localhost", "admin", "the_password") or die("Could not connect to MySQL: ".mysql_error());Here's part 2 of the story. I use my local machine to test all of the code before moving it to the server. Now, on my local machine I went into phpmyadmin and added a new user to mysql without admin access; just the necessary user permissions that a public user would need. I tested it on my machine and it worked. I changed all of my calls to:
Code: Select all
$conn = mysql_connect("localhost", "new_name", "new_password") or die("Could not connect to MySQL: ".mysql_error());Any inkling as to why this may not be working on the server? The permissions in phpmyadmin are exactly the same on the server as they are on my machine. I went into phpmyadmin for the server and set up the exact same thing.Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\Inetpub\vhosts\the_website.com\httpdocs\yadayada\the_page.php on line 4
Could not connect to MySQL
Thanks.