I have installed a new issue of mysql 4.1 and am able to build and control a database via the cmd line. However I can't connect using php. My system is windows XP.
My php commands require a pw and user name and I don't have a user name. I tried to connect to the root with php and could not. Below is the results and the php program I used. Any advice you could provide to this lost soul would be greatly appreciated.
Message when trying to connect to apache with mysqltest.php
***********************************************************
Using no password for root.
***************************
Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in C:\Program Files\Apache Group\Apache2\htdocs\mysqltest.php on line 7
Sorry - unable to connect to MySQL
Using the password for the root.
********************************
Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\Program Files\Apache Group\Apache2\htdocs\mysqltest.php on line 7
Sorry - unable to connect to MySQL
The below is the progmam I used.
********************************
<?php
$connection = mysql_connect ( "localhost", "root", "") or die ( "Sorry - unable to connect to MySQL" );
echo( "Congratulations - you connected to MySQL" );
?>
How do I get a user name to use with my password.
I can get in at the cmd line using root and the pw but not with php.
My php commands require a pw and user name and I don't have a user name. I tried to connect to the root with php and could not. Below is the results and the php program I used. Any advice you could provide to this lost soul would be greatly appreciated.
Message when trying to connect to apache with mysqltest.php
***********************************************************
Using no password for root.
***************************
Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in C:\Program Files\Apache Group\Apache2\htdocs\mysqltest.php on line 7
Sorry - unable to connect to MySQL
Using the password for the root.
********************************
Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\Program Files\Apache Group\Apache2\htdocs\mysqltest.php on line 7
Sorry - unable to connect to MySQL
The below is the progmam I used.
********************************
<?php
$connection = mysql_connect ( "localhost", "root", "") or die ( "Sorry - unable to connect to MySQL" );
echo( "Congratulations - you connected to MySQL" );
?>
How do I get a user name to use with my password.
I can get in at the cmd line using root and the pw but not with php.