Ask the Expert

Errors when running mysql_up.php

I installed everything - MySQL 4.1.9, PHP 4.3.010, (and trying on a separate PC - Windows 2000 Pro and Apache), and they all installed correctly but I am getting the following errors when I run the page mysql_up.php (shown further down the page).
Warning: mysql_connect(): Client does not support authentication protocol 
requested by server; consider upgrading MySQL client in 
c:inetpubwwwrootmysql_up.php on line 12

Warning: mysql_query(): Access denied for user 'ODBC'@'localhost' (using 
password: NO) in c:inetpubwwwrootmysql_up.php on line 14

Warning: mysql_query(): A link to the server could not be established in 
c:inetpubwwwrootmysql_up.php on line 14
Error 1045: Access denied for user 'ODBC'@'localhost' (using password: NO) 

Requires Free Membership to View

You first question is a common problem with MySQL 4.1 and PHP. I have answered this so many times I now have a FAQ entry for it.

The second and third errors are caused by not specifying a username and password when connecting to MySQL, you need to specify a username and password in your mysql_connect() call.

This was first published in March 2005

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: