Thanks to Tim Gallagher, I will try it, but now I have some other problem,
I send the mail to [EMAIL PROTECTED], now also place here. I have hard
time to resolve those problem, because I have be charged by my ISP, so I
have to as fast as possible transfer my servlet+mysql web to Internet.
Firstly, who can tell me in average how long can the dynamical servlet+mysql
page be shown in the browser in the Internet ?
Following is my other 3 problem:
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?
Sorry, mybe this 3 problems off topic.
Please help me.
Jack
>Jack,
>
>One thing you could try is to create your own log file for the servlet that
>will track the time it takes to process the servlet request. This will
tell
>you how long the actual request takes. The rest of the time can be
attributed
>to the communications line.
>
>for example:
>
>public void servletTimer(HttpRequest req, HttpResponse resp)
>{
> // -- open the log file
>
> // write the start time
> logfile.write("Start processing: " + System.currentMillis());
>
> // call your actual servlet processer function
> actuallRequesetProcessor(req, resp);
>
> // write the end time
> logfile.write(" End processing: " + System.currentMillis());
>}
>
>
>This method would allow you to compare actual processing time on your
>development environment and the time on the ISP.
>
>Tim Gallagher
>
>
>
>Jack Wang wrote:
>
>> Hi,all,
>>
>> I have developed a project with servlet and MySQL in windows 98 platform.
>> Now I hosting the project web in a ISP's server. In my local developing
>> environment, the speed is fast, I can browse the dynamical html page
>> retrived from MySQL in 1 to 2 seconds, and the servlet engine is JRUN.
>>
>> But when the web is transfered to ISP's machine, the speed is very very
>> sloooooowwwwwwwwwww, about 20 seconds, the ISP's machine is also setup
with
>> MySQL and JRUN, where is the problem?
>>
>> Any help are appreciated very much, any help, any help, I am eager for
>> resolving the problem.
>>
>> Thanks.
>>
>> Jack
>>
>>
___________________________________________________________________________
>> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
>> of the message "signoff SERVLET-INTEREST".
>>
>> Archives: http://archives.java.sun.com/archives/servlet-interest.html
>> Resources: http://java.sun.com/products/servlet/external-resources.html
>> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html