List:General Discussion« Previous MessageNext Message »
From:Jack Wang Date:September 28 1999 1:06am
Subject:Cannot connect to MySQL server
View as plain text  
Hi,all.

I have read the old mail list, but did not find the answer.

I use org.gjt.mm.mysql jdbc driver to connect to mysql, my servlet (java)
is passed when I use "nobody/null" as the user name and password.

Now I change the mysql database's user table, set user "jack" password with
"jackpass", then reload the database, and in the servlet use "jack/jackpass"
as the user name and password.

I run the mysql as "mysqld" (note: I can not see safe_mysqld.exe in
3.21.29gamma
for win32), the mysqld 's process ID is 5, its user is jack. I can use
mysqlshow,
mysql,mysqladmin with user name "jack" and password "jackpass' in command.

To my suprise, I can see the table which was created with "jack/jackpass"
without
any use name and password, simple "mysql testdatabase" and "select * from
mytable | go". This is one problem.

And the most important problem is that when I change the user name and
password
from "nobody/null" to "jack/jackpass", my servlet which uses
org.gjt.mm.mysql
reports the following err:

"500 Internal Server Error
FindClass:
java.lang.NullPointerException
          ("This is used to test MySQL database" sent by me)
DriverManager:java.sql.SQLException: Cannot connect to MySQL server on
wangjun:3306. Is there a MySQL server running on the machine/port you are
trying to connect to? 1"

user table has a record
('%','jack','password('jackpass')','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y')

At last please ask where can I find the mysql.server script which is used to
start mysqld as another user?

Thanks in advances.

Jack


Thread
Cannot connect to MySQL serverJack Wang28 Sep
  • Cannot connect to MySQL serverJani Tolonen1 Oct