Ok, I have one more strand of hair to pull before I'm absolutely bald... for the life of me, I can not get passed the DB connection setup screen. It has been 4 days now and I'm just giving up... what am I missing?
- Install went fine for apache, php, and cmsms.
- apache2, php 511, and mysql 5027.
- Apache is running and phpinfo() works just fine.
- mysql is running.
- DB 'cmsms 'and User' cms_user' created.
- grant all privileges on cms.* to cms_user@localhost identified by 'cms_pass'; completed fine. I did both local and named hosts.
- I can login fine using 'mysql' on host with above credentials.
- I have gone through the entire forum and implemented every suggestions I found, yet no luck.
- I have seen some posts about turning debugging on in config.php, how do you do that?
- Where I can look to find out why connection is failing? Any log or trace files.
- Does anyone know how to fix it or any potential resolutions?
Please please please help and save my poor soul!!!
Cannot Connect to the Database
Re: Cannot Connect to the Database
let me add, I was also able to verify that php and mysql can talk just fine. My install passed these 2 tests ok. This makes the issue specific to CMS. Can some one shed some light please.
and this one too
The Connection Test Script was unable to connect
to the MySQL server!One or more of these variables are wrong in
your config.php: \$dbhost=\"$dbhost\",
\$dbuname=\"$dbuname\", and/or \$dbpass=\"*hidden*\"
";
echo "Now, please don't say that you are using the
correct values - say it to your mysql server, because that is who(what?)
is stopping you. : )";
echo "Email your web host and ask them what to use for a mysql
username and password.";
echo "PHP Manual, function:
mysql_connect";
echo "If you are the server, perhaps you just need to create
a mysql user instead of using your root user.";
die("
phpinfo");
}else{
echo "
phpinfo";
echo "If everything looks good, but you
still have problems, get the ";
echo "
analyzer from NukeCops";
echo "Connection Test Script connected to your MySQL server
successfully!";
echo "\$dbuname = \"$dbuname\";\$dbtype = \"$dbtype\";
\$prefix = \"$prefix\";\$user_prefix = \"$user_prefix\";";
if (mysql_select_db($dbname)) {
echo "Connection to your database \"
$dbname\" was also successful.";
$result = mysql_list_tables($dbname);
if (!$result) {
print "DB Error, could not list tables\n";
print 'MySQL Error: ' . mysql_error();
die();
}
$i=0;
$stufftoprint = "";
while ($row = mysql_fetch_row($result)) {
$tablename = $row[0];
if($tablename == "".$prefix."_authors") {
$result4 = mysql_query("select aid from $tablename");
while(list($admin_name) = mysql_fetch_row($result4)) {
$admin_names .= "$admin_name, ";
}
}
$result3 = mysql_query("select * from $tablename");
$numFields = mysql_num_fields($result3);
$numRows = mysql_num_rows($result3);
$rows = "rows";
$fields = "fields";
if($numFields == 1) {$fields = "field";}
if($numRows == 1) {$rows = "row";}
$stufftoprint .= "Table: $tablename
($numFields $fields / $numRows $rows)\n";
$i++;
}
if($dbtype != "MySQL" AND eregi("mysql",$dbtype)) {
echo "But, you need to set
\$dbtype = \"MySQL\"; ";
echo " in your config.php!!!!!!!!";
}
echo "There are $i tables in your \"
$dbname\" database";
echo "(by default, there are 89 fields in phpnuke 6.5 and 76 fields
in phpnuke 6.0)";
if($iYou don't seem to have all the
tables installed.Get the ";
echo "Web Installer for your version of
phpnuke";
}
echo "These are the admin names (aid) in your nuke_authors
table: $admin_names";
echo "Now check this list of tables with your nuke.sql file:$stufftoprint";
}else {
if(mysql_query("CREATE DATABASE $dbname")) {
echo "Your database \"$dbname\" did not exist,
but this script just created it sucessfully";
echo "Now, you need to get the appropriate
";
echo "Web Installer from nukeresources.com";
die();
}
echo "However, the \"$dbname\" database does not exist.
If that is not the correct name, then put in the correct ";
echo "name for
\$dbname =\"$dbname\"; (in your config.php)
If you have not created the database yet, then ";
echo "create it. If you are not the server, then ask your
web host to create it for you.";
echo "Then, get the appropriate
";
echo "Web Installer from nukeresources.com";
}
}
?>
and this one too
The Connection Test Script was unable to connect
to the MySQL server!One or more of these variables are wrong in
your config.php: \$dbhost=\"$dbhost\",
\$dbuname=\"$dbuname\", and/or \$dbpass=\"*hidden*\"
";
echo "Now, please don't say that you are using the
correct values - say it to your mysql server, because that is who(what?)
is stopping you. : )";
echo "Email your web host and ask them what to use for a mysql
username and password.";
echo "PHP Manual, function:
mysql_connect";
echo "If you are the server, perhaps you just need to create
a mysql user instead of using your root user.";
die("
phpinfo");
}else{
echo "
phpinfo";
echo "If everything looks good, but you
still have problems, get the ";
echo "
analyzer from NukeCops";
echo "Connection Test Script connected to your MySQL server
successfully!";
echo "\$dbuname = \"$dbuname\";\$dbtype = \"$dbtype\";
\$prefix = \"$prefix\";\$user_prefix = \"$user_prefix\";";
if (mysql_select_db($dbname)) {
echo "Connection to your database \"
$dbname\" was also successful.";
$result = mysql_list_tables($dbname);
if (!$result) {
print "DB Error, could not list tables\n";
print 'MySQL Error: ' . mysql_error();
die();
}
$i=0;
$stufftoprint = "";
while ($row = mysql_fetch_row($result)) {
$tablename = $row[0];
if($tablename == "".$prefix."_authors") {
$result4 = mysql_query("select aid from $tablename");
while(list($admin_name) = mysql_fetch_row($result4)) {
$admin_names .= "$admin_name, ";
}
}
$result3 = mysql_query("select * from $tablename");
$numFields = mysql_num_fields($result3);
$numRows = mysql_num_rows($result3);
$rows = "rows";
$fields = "fields";
if($numFields == 1) {$fields = "field";}
if($numRows == 1) {$rows = "row";}
$stufftoprint .= "Table: $tablename
($numFields $fields / $numRows $rows)\n";
$i++;
}
if($dbtype != "MySQL" AND eregi("mysql",$dbtype)) {
echo "But, you need to set
\$dbtype = \"MySQL\"; ";
echo " in your config.php!!!!!!!!";
}
echo "There are $i tables in your \"
$dbname\" database";
echo "(by default, there are 89 fields in phpnuke 6.5 and 76 fields
in phpnuke 6.0)";
if($iYou don't seem to have all the
tables installed.Get the ";
echo "Web Installer for your version of
phpnuke";
}
echo "These are the admin names (aid) in your nuke_authors
table: $admin_names";
echo "Now check this list of tables with your nuke.sql file:$stufftoprint";
}else {
if(mysql_query("CREATE DATABASE $dbname")) {
echo "Your database \"$dbname\" did not exist,
but this script just created it sucessfully";
echo "Now, you need to get the appropriate
";
echo "Web Installer from nukeresources.com";
die();
}
echo "However, the \"$dbname\" database does not exist.
If that is not the correct name, then put in the correct ";
echo "name for
\$dbname =\"$dbname\"; (in your config.php)
If you have not created the database yet, then ";
echo "create it. If you are not the server, then ask your
web host to create it for you.";
echo "Then, get the appropriate
";
echo "Web Installer from nukeresources.com";
}
}
?>