hello,
i'am working on REDHAT,and trying to connect to a mysql DB. i tested this code which
works correctly on Windows.
------------------------
import java.sql.*;
//
public class TestMM
{
public static void main(String args[])
{
// Chargement du driver JDBC
try
{
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
}
catch (Exception e)
{
System.err.println("Chargement du pilote impossible.");
System.err.println(e);
}
//
// Etablissement de la connexion
try
{
Connection connexion = DriverManager.getConnection
("jdbc:mysql://localhost/base1", "root", "boss");
System.out.println ("La connexion fonctionne parfaitement");
connexion.close();
}
catch(SQLException e)
{
System.err.println("***** SQLException : *****");
while (e != null)
{
System.out.println("Message : " + e.getMessage ());
System.out.println("Etat : " + e.getSQLState
());
System.out.println("Code Erreur : " + e.getErrorCode
() + "\n");
e = e.getNextException();
}
}
}
}
--------------------------------
On RedHat, i found this error:
***** SQLException : *****
Message : invalid authorization specification: Access denied from user: '[EMAIL
PROTECTED]'(Using password: YES)
Etat : 28000
Code Erreur : 1045
Whereas while testing the same login and password on MySQL (shell mode) it worked
correctly.
May you help me please!!!!
Thanks in advance.
Yours Sincerely,
Dorra
Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]