I have exactly the same problem with the posting below, and I have already searched the answered message. But I can't find it on the list message. Does anybody know how to solve ? Sorry for my bad English... :) Thank's --Andy-- Subject: Troubles Accessing MySql Databases and Creating tables. From: Marco Date: Mon, 16 Oct 2000 13:47:19 -0600 I'm trying to test MySql with a simple application under Windows 2000, using Java 1.3. Seen that test example directory is empty, I want to insert a table in test Database and fill it up with several records. I installed mysql and jdbc drivers properly but, while executing code you can see below I had several troubles. Both If I use user="monty" and password="greatsqldb" and if I use "password"="05af916101598312" I have this error: ' java.sql.SQLException: Invalid authorization specification: Access denied for user: 'monty@localhost' (Using password: YES) ' at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java) ' at org.gjt.mm.mysql.Connection.connectionInit(Connection.java) ' at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Connection.java:89) ' at org.gjt.mm.mysql.Driver.connect(Driver.java) ' at java.sql.DriverManager.getConnection(DriverManager.java:517) ' at java.sql.DriverManager.getConnection(DriverManager.java:177) ' at MakeAPIDB.main(MakeAPIDB.java:178) This is my code: driver = p.getProperty("driver", "org.gjt.mm.mysql.Driver"); database = p.getProperty("database","jdbc:mysql:///test"); user = p.getProperty("user", "monty"); password = p.getProperty("password","05af916101598312"); // or "greatsqldb" such as in manual // Load the database driver Class.forName(driver); // And set up a connection to the specified database c = DriverManager.getConnection(database, user, password); deleteTable(c); createTable(c); I thought it was 'cause there's no user table in test Database. So i tried to access mysql database with same code by changing database string. database = p.getProperty("database","jdbc:mysql:///mysql"); Even monty user exists and has all privileges, I had this message: java.sql.SQLException: Invalid authorization specification: Access denied for user: 'monty@localhost' (Using password: YES) Only using user="" or user="root" both with password="" I can get connected to Database but in creating Table I have the following exception: java.sql.SQLException: Syntax error or access violation: You have an error in your SQL syntax near 'Int1 INT , Int2 INT , String3 CHAR(30) , String4 CHAR(30) , String5 CHAR(30) , D' at line 1 at org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java) at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java) at org.gjt.mm.mysql.MysqlIO.sqlQuery(MysqlIO.java) at org.gjt.mm.mysql.Connection.execSQL(Connection.java) at org.gjt.mm.mysql.Connection.execSQL(Connection.java) at org.gjt.mm.mysql.Statement.execute(Statement.java) at org.gjt.mm.mysql.jdbc2.Statement.execute(Statement.java:114) at MakeAPIDB.createTable(MakeAPIDB.java:315) at MakeAPIDB.main(MakeAPIDB.java:180) The Sql strings I used to test creation are like the following and correctly wok with several others databases. -> CREATE TABLE testTable (Int1 INT, int2 INT, string3 CHAR(30), string4 CHAR(30), string5 CHAR(30), double6 DOUBLE, int7 INT, int8 INT, int9 INT, string10 CHAR (30), string11 CHAR(30), string12 CHAR(30), string13 CHAR(30)); ERROR 1064: You have an error in your SQL syntax near 'mysql -> CREATE TABLE testTable (int1 INT(4), int2 INT(4), string3 CHAR(30), string4 CHAR(30), string5 CHAR(30), double6 DOUBLE(16,2), int7 INT(4), int8 INT(4), int9 INT(4), string10 CHAR(30), string11 CHAR(30), string12 CHAR(30) PRIMARY KEY(Int1)); ERROR 1064: You have an error in your SQL syntax near 'int1 INT(4), int2 INT(4), string3 CHAR(30), string4 CHAR(30), string5 CHAR(30), ' at line 1 Why can't I access test database? Why can't I create my test Table? Please send me any suggestion you may have. Thank you, Marco --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php