01-13-2010, 12:17 PM
interfleet
2007-03-02 10:31:20 PST
I am trying to auto install OpenDocMan and I am getting this error message:
Unable to Create Database - Error in query:Access denied for user: 'erikven@%' to database 'opendocman1'
My hosting company said that I would have to have a specific code in my php to be able to connect, and they even provided it but I have no idea where to insert it.
It looks like this:
<?php
//Sample Database Connection Syntax for PHP and MySQL.
//Connect To Database
$hostname="mysql.secureserver.net";
$username="your_dbusername";
$password="your_dbpassword";
$dbname="your_dbusername";
$usertable="your_tablename";
$yourfield = "your_field";
mysql_connect($hostname,$username, $password);
mysql_select_db($dbname);
# Check If Record Exists
$query = "SELECT * FROM $usertable";
$result = mysql_query($query);
if($result)
{
while($row = mysql_fetch_array($result))
{
$name = $row["$yourfield"];
echo "Name: ".$name."
";
}
}
?>
Could someone please help me out?
Thanks.
logart
2007-03-02 10:50:49 PST
Your user must have CREATE permissions on the opendocman1 database in order for the auto-install to work. In your case it looks like you are using erikven as the "root" user.
If you cannot use the auto-install just use phpMyAdmin or something like that to import the database.sql script.
2007-03-02 10:31:20 PST
I am trying to auto install OpenDocMan and I am getting this error message:
Unable to Create Database - Error in query:Access denied for user: 'erikven@%' to database 'opendocman1'
My hosting company said that I would have to have a specific code in my php to be able to connect, and they even provided it but I have no idea where to insert it.
It looks like this:
<?php
//Sample Database Connection Syntax for PHP and MySQL.
//Connect To Database
$hostname="mysql.secureserver.net";
$username="your_dbusername";
$password="your_dbpassword";
$dbname="your_dbusername";
$usertable="your_tablename";
$yourfield = "your_field";
mysql_connect($hostname,$username, $password);
mysql_select_db($dbname);
# Check If Record Exists
$query = "SELECT * FROM $usertable";
$result = mysql_query($query);
if($result)
{
while($row = mysql_fetch_array($result))
{
$name = $row["$yourfield"];
echo "Name: ".$name."
";
}
}
?>
Could someone please help me out?
Thanks.
logart
2007-03-02 10:50:49 PST
Your user must have CREATE permissions on the opendocman1 database in order for the auto-install to work. In your case it looks like you are using erikven as the "root" user.
If you cannot use the auto-install just use phpMyAdmin or something like that to import the database.sql script.