I really hate to be asking tedious "help, I can't install" questions,
but I've poked at the code for a few hours and I'm out of ideas.
The short question:
Could someone running MySQL with the usual MM MySQL driver insert:
Log.note("DB_CONNECTION is "+DB_CONNECTION);
in DBMM.java on line 96 and tell me what they get? Or rather, does the
following look right?
DriverManager.getConnection("jdbc:mysql://localhost/turbine?user=root&password=foo");
I've created the MySQL tables as per the installation instructions,
and verified that user "root", password "foo" works, but the MySQL
driver doesn't allow me to connect with that string. Anyone more
familiar with JDBC than me know why?
The long question:
After the login screen, I get the following exception (taken from the
logfile):
java.sql.SQLException: Invalid authorization specification: Access
denied for user: 'nobody@localhost' (Using password: NO)
at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java)
at org.gjt.mm.mysql.Connection.<init>(Connection.java)
at org.gjt.mm.mysql.Driver.connect(Driver.java)
at java.sql.DriverManager.getConnection(DriverManager.java:457)
at java.sql.DriverManager.getConnection(DriverManager.java:159)
at
org.apache.turbine.util.db.pool.DBMM.getConnection(DBMM.java:97)
......
Obvious causes I've eliminated:
-- MySQL installed, turbine tables installed as per installation
instructions
-- TurbineResources.properties file visible to Tomcat, with
following customisations:
database.default.driver=org.gjt.mm.mysql.Driver
database.default.url=jdbc:mysql://localhost/turbine
database.default.username=root
database.default.password=foo
-- Verified that MySQL accepts user "root", password "foo"
I poked around at the relevant code (DBMM.java, line 97), which is the
following method:
public Connection getConnection() throws SQLException
{
return DriverManager.getConnection( DB_CONNECTION );
}
I did a Log.note() to see what DB_CONNECTION is, and it's:
jdbc:mysql://localhost/turbine?user=root&password=foo
I had a look in the driver code (isn't open source cool:) and found
that user name "nobody" is set by the driver when no user name is
otherwise specified. So it looks like the MySQL driver isn't parsing
that string properly. The MySQL driver doesn't support JDBC2.0, so I
can't insert debug statements without a 1.1x compiler.
Any help or info appreciated :)
--Jeff Turner
(Btw, installing is so often a problem, how about someone starting an
open source, expert system-based web app that codifies all the
possible things that can go wrong with a software installation? "Have
you installed a database?" Yes. "Have you created turbine tables?"
Yes. "Have you...." etc)
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]