adicrst Posted November 24, 2007 Share Posted November 24, 2007 i've installed xampp and everything works fine until i try a php script to connect at the fatabase and i get this error message: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\test\index.php on line 2Could not connect: Access denied for user 'ODBC'@'localhost' (using password: NO) the apache server and mysql are started, i used this script <?php$con = mysql_connect("localhost","","");if (!$con) { die('Could not connect: ' . mysql_error()); }// some code?> what do i have to do ? i've tried every posibility and didnt worked. Here's how the settings look like if i look in the mysql adminhere is everything i tried:1 <?php$con = mysql_connect("localhost","Cristea Adrian","");if (!$con) { die('Could not connect: ' . mysql_error()); }// some code?> error Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'Cristea Adrian'@'localhost' (using password: NO) in C:\xampp\htdocs\test\index.php on line 2Could not connect: Access denied for user 'Cristea Adrian'@'localhost' (using password: NO) 2 <?php$con = mysql_connect("SHINOBI","Cristea Adrian","");if (!$con) { die('Could not connect: ' . mysql_error()); }// some code?> ERROR Warning: mysql_connect() [function.mysql-connect]: Host 'SHINOBI' is not allowed to connect to this MySQL server in C:\xampp\htdocs\test\index.php on line 2Could not connect: Host 'SHINOBI' is not allowed to connect to this MySQL server Link to comment Share on other sites More sharing options...
adicrst Posted November 24, 2007 Author Share Posted November 24, 2007 ok, nevermind i found out that i have to put root instead of username Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.