I am not sure if a Java JDBC error is appropriate for this list or not. If
not, I apologize in advance.

I'm getting the error below that I'm trying figure out where to start
researching... "Invalid authorization- access denied for user"...

This seems strange b/c I'm using "root" as username, "secret" is password.
I'm able to log into mysql using that info so I'm not sure why I don't have
access to this particular table. I was under the impression that the "root"
user in MySQL had permissions to all tables... hmmmmmmm....

[my code is below if anyone is interested- i know it's not very exciting-
i'm very new to both Java & MySQL]

[lfindle@localhost java]$ javac TestMMDriver.java
[lfindle@localhost java]$ java TestMMDriver

java.sql.SQLException: Invalid authorization specification: Access denied
for user: '[EMAIL PROTECTED]' (Using password: YES)
        at java.lang.Throwable.fillInStackTrace(Throwable.java:native)
        at java.lang.Throwable.<init>(Throwable.java:38)
        at java.lang.Exception.<init>(Exception.java:24)
        at java.sql.SQLException.<init>(SQLException.java:22)
        at org.gjt.mm.mysql.MysqlIO.init(source file unknown:line unknown, pc
0x829148e)
        at org.gjt.mm.mysql.Connection.connectionInit(source file unknown:line
unknown, pc 0x826044b)
        at org.gjt.mm.mysql.jdbc1.Connection.connectionInit(Connection.java:92)
        at org.gjt.mm.mysql.Driver.connect(source file unknown:line unknown, pc
0x824eab1)
        at java.sql.DriverManager.getConnection(DriverManager.java:61)
        at java.sql.DriverManager.getConnection(DriverManager.java:49)
        at TestMMDriver.main(TestMMDriver.java:35)

Any suggestions on where to research these errors would be most
appreciated...
Thanks, in advance-
Laura
AIM- lefindley
---------------------------------------------------------------
import java.io.*;
import java.sql.*;
//import java.sql.ResultSetMetaData;
import jpb.*;
import java.util.*;

// JDBC Imports
import org.gjt.mm.mysql.*;
import org.gjt.mm.mysql.Connection;
import org.gjt.mm.mysql.Statement;
import org.gjt.mm.mysql.Driver;
import org.gjt.mm.mysql.ResultSet;

public class TestMMDriver {

   public static void main(String[] args){

   Connection con = null;


      try {
         String url = "jdbc:mysql://localhost:80/brandonbooks";

         Statement stmt;
         ResultSet rs;

         Class.forName("org.gjt.mm.mysql.Driver");

         con = (Connection)
DriverManager.getConnection(url,"root","secret");          }
       catch (java.sql.SQLException e) {
         e.printStackTrace();
       }
       catch(java.lang.ClassNotFoundException e){
         e.printStackTrace();
       }

       finally {
          if (con != null){
             try {
                 con.close();
             }
             catch (Exception e){
             }
          }
       }

   }
}








---------------------------------------------------------------------
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

Reply via email to