View Single Post
  #7  
Old 15th August 2006, 13:54
bruma bruma is offline
Member
 
Join Date: Aug 2006
Location: Slovenia
Posts: 33
Thanks: 4
Thanked 0 Times in 0 Posts
Send a message via ICQ to bruma
Default

Quote:
Originally Posted by sjau
can you test this script and tell me the output?

Code:
<?

//Global variables:
$username = ""; // Username for database here
$password = ""; // Password for database here
$db_host = "localhost"; // DB Server
$db_name =  ""; //name of your database here

// Connect to DB
mysql_connect("$db_host","$username","$password")
	or die("Unable to connect to SQL server!");
mysql_select_db("$db_name")
	or die("Unable to select database!");

echo "Connection established to $db_name";

?>
This is the output:
Quote:
Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in /home/admispconfig/ispconfig/web/mysqldb.php on line 10
Unable to connect to SQL server!
My server is Ubuntu 6.06. Installed mysql packages:
ii mysql-client 5.0.22-0ubuntu6.06 mysql database client (current version)
ii mysql-client-5.0 5.0.22-0ubuntu6.06 mysql database client binaries
ii mysql-common 5.0.22-0ubuntu6.06 mysql database common files (e.g. /etc/mysql
ii mysql-server 5.0.22-0ubuntu6.06 mysql database server (current version)
ii mysql-server-5.0 5.0.22-0ubuntu6.06 mysql database server binaries

Last edited by bruma; 15th August 2006 at 14:00.
Reply With Quote