Web Hosting Talk







View Full Version : CPanel problems with MySQL


pobox300
04-01-2002, 04:54 AM
I'm sure this has been hashed over a couple of times here, as I went over to cpanel.net and looked up their info on it, but there doesn't seem to be one complete thread with a fix.

CPanel can create both databases and users, however when you try to add the user to the database, it gives a connection error.

Below is an example of what can be seen in CPanel after a user has been added to the database:

-----------------------------------------------------------------------------
$dbh = DBI->connect("DBI:mysql:hostus_forum:localhost","hostus_hostus","<PASSWORD HERE>");
dbh=mysql_connect ("localhost", "hostus_hostus", "<PASSWORD HERE>") or die ('I cannot connect to the database.');
mysql_select_db ("hostus_forum");
<%@ page import="java.sql.*" %>
Connection connection = null;
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
connection = DriverManager.getConnection(
"jdbc:mysql://localhost/hostus_forum?user=hostus_hostus&password=<PASSWORD HERE>");
-----------------------------------------------------------------------------

From what I have read it seems to be a GRANT - tables issue either caused by an incorrect password, or one that was reset during an upgrade.

If anyone has experienced this same problem and was able to fix it could you post it here.

Thanks in advance.