Hello,
Thank you for the answer but it's look like the parameter "skip-networking"
is not present.
I am really getting hard time.
Here's my "my.cnf" :
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "/var/lib/mysql/my.cnf" to set server-specific options or
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
[client]
#password = my_password
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently
parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
# Both location gets rotated by the cronjob.
#log = /var/log/mysql.log
log = /var/log/mysql/mysql.log
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
#
# For compatibility to other Debian packages that still use
# libmysqlclient10 and libmysqlclient12.
old-passwords = 1
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
#
# Query Cache Configuration
#
query_cache_limit = 1048576
query_cache_size = 26214400
query_cache_type = 1
#
# Here you can see queries with especially long duration
#log-slow-queries = /var/log/mysql/mysql-slow.log
#
# The following can be used as easy to replay backup logs or for replication
#server-id = 1
#log-bin = /var/log/mysql/mysql-bin.log
#binlog-do-db = include_database_name
#binlog-ignore-db = include_database_name
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# If you want to enable SSL support (recommended) read the manual or my
# HOWTO in /usr/share/doc/mysql-server/SSL-MINI-HOWTO.txt
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
> Hi,
>
> your ploblem is most likely debian related. In debian mysql has a config
> parameter "skip-networking" which denies tcp connections to mysql. Make
> sure this setting is not set, and that you grant your user access from
> 127.0.0.1 not localhost because when using localhost mysql expects the
> user to connect via a unix socket, not a tcp socket.
>
> Good luck
>
> Trond
>
> monkiboy wrote:
>
> >Hi everybody!
> >I have a weird problem to use the MySQL-connector under Linux (Debian). I
heard it can come from Tomcat.
> >I have no problem in windows XP, all is working fine !
> >But under Linux when I try to connect to mysql throught mysql-connector
wrote in a Servlet I have this message :
> >
> >Message: Invalid authorization specification message from server: "Access
denied for user 'root'@'monkinetwork' (using password: YES)"
> >SQLState: 28000
> >ErrorCode: 1045
> >
> >I am Using : Tomcat 5.0.28
> >MySQL-Connector version is : mysql-connector-java-3.0.15-ga-bin.jar
> >
> >JDK Version : 1_5_0_01. Servlet-Examples and JSP works fine! So I don't
think the problem come from JDK.
> >
> >MySQL version : MySQL-SERVER-4.1.9-2 : All is working under console mode
!
> >
> >Here's My Servlet TESt1.java:
> >
> >
> >Code:
> >
> >
> >import java.io.*;
> >import javax.servlet.*;
> >import javax.servlet.http.*;
> >import java.sql.*;
> >import java.sql.DriverManager;
> >
> >public class TEST1 extends HttpServlet {
> >public void doGet(HttpServletRequest request, HttpServletResponse
response)
> >throws ServletException, IOException {
> >
> > response.setContentType("text/html");
> > PrintWriter out = response.getWriter();
> >
> > String url = "jdbc:mysql://localhost:3306/HeroDB";
> > String user = "root";
> > String password = "password";
> >
> >try{
> > Class.forName("com.mysql.jdbc.Driver");
> > out.println("<br> DRIVERS JDBC : OK!");
> > Connection connection =
DriverManager.getConnection(url,user,password);
> >
> > out.println("<br> Database connection : OK!");
> >
> > }
> >catch (ClassNotFoundException e)
> > {
> > out.println("Error with JDBC Drivers !");
> > }
> >catch(SQLException ex) {
> >
> >
> > out.println("<br> ERROR MESSAGE <br>");
> > while (ex != null) {
> >
> > out.println("<br>Message: " + ex.getMessage ());
> >
> > out.println("<br>SQLState: " + ex.getSQLState ());
> >
> > out.println("<br>ErrorCode: " + ex.getErrorCode ());
> >
> > ex = ex.getNextException();
> > out.println("");
> > }
> >}
> >
> >
> >}
> >}
> >
> >
> >
> >AND THE HTML PAGE in order to access to the Servlet :
> >
> >Code:
> >
> ><HTML>
> ><HEAD>
> ><TITLE>DataBase Test</TITLE>
> ></HEAD>
> ><BODY BGCOLOR="#FDF5E6">
> ><H2 ALIGN="CENTER">DataBase TEST</H2>
> >
> ><FORM ACTION="http://localhost:8080/TEST1">
> ><CENTER>
> ><INPUT TYPE="SUBMIT" VALUE = "CONNEXION TEST">
> ></CENTER>
> ></FORM>
> >
> ></BODY>
> ></HTML>
> >
> >Theses codes works very well under windows, but under linux system here
what I've got :
> >
> >DRIVERS JDBC : OK!
> >ERROR MESSAGE
> >Message: Invalid authorization specification message from server: "Access
denied for user 'root'@'monkinetwork' (using password: YES)"
> >SQLState: 28000
> >ErrorCode: 1045
> >
> >Well, the web.xml file is well configured.
> >
> >Anyway : I already tried with class: org.gjt.mm.mysql.driver, but I have
the same message error !
> >
> >By the way, it's very strange that I can play with MySQL under the
terminal but not throught tomcat.
> >Any suggestions please , because it's giving me a very hard time ! ?
> >Thank you !
> >++
> >monkiboy
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]