pyreneeen
4-18-02, 08:04 AM
Hello,
is there anybody who could provide me an cgi script (template) to connect to mysql?. I have been trying the following one during several days and I get always the same error message:" Access denied".Before running this script I have set up some tables in the server, so normally I would have to have access.
$database = "mydatabase";
$hostname = "localhost";
$port="3306";
$user = "myuserid";
$password = "mypassword";
$dbh = DBI->connect("DBI:mysql:$database:$hostname:$port",
$user, $password);
And the message that I am getting is:
Unable to execute SQL statement
DBD::mysql::st execute failed: Access denied for user: 'myuser@localhost' to database 'Mydatabase' at listresort.cgi line 15.
Thanks to everybody who could help me
Marc
is there anybody who could provide me an cgi script (template) to connect to mysql?. I have been trying the following one during several days and I get always the same error message:" Access denied".Before running this script I have set up some tables in the server, so normally I would have to have access.
$database = "mydatabase";
$hostname = "localhost";
$port="3306";
$user = "myuserid";
$password = "mypassword";
$dbh = DBI->connect("DBI:mysql:$database:$hostname:$port",
$user, $password);
And the message that I am getting is:
Unable to execute SQL statement
DBD::mysql::st execute failed: Access denied for user: 'myuser@localhost' to database 'Mydatabase' at listresort.cgi line 15.
Thanks to everybody who could help me
Marc