Re: Connection problem after long idle periods

2006-02-10 Thread Mark Matthews

Michael Lai wrote:

David Logan wrote:


Michael Lai wrote:

I am currently using MySQL 5.0.15 with mysql-connector-java-3.1.11.  
I can access the database from my JSPs with no problem except for one 
small issue.  After a long delay (usually overnight), when someone 
first tries to access the database, I would get the following error:


Communications link failure due to underlying exception: ** BEGIN 
NESTED EXCEPTION ** java.net.SocketException MESSAGE: Broken pipe 
STACKTRACE: java.net.SocketException: Broken pipe at 
java.net.SocketOutputStream.socketWrite0(Native Method) at 
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) 
at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at 
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) 
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) 
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2690) at 
com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2619) at 
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1552) at 
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666) at 
com.mysql.jdbc.Connection.execSQL(Connection.java:2978) at 
com.mysql.jdbc.Connection.execSQL(Connection.java:2902) at 
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:933) 
at 
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1027) 
at 
org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) 
at 
org.apache.jsp.processLogin_jsp._jspService(org.apache.jsp.processLogin_jsp:81) 
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322) 
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) 
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) 
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) 
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) 
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) 
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) 
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) 
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) 
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) 
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) 
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) 
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) 
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) 
at java.lang.Thread.run(Thread.java:595) ** END NESTED EXCEPTION ** 
Last packet sent to the server was 0 ms ago.


But afterwards, on the second and subsequent attempts, the database 
runs fine.  It is only the first try after a long idle period that I 
get this error message.  I am not sure how to fix this.  I am 
guessing that the database connection is down after a long idle 
period and have to recreate a connection first after the first try.



Hi Michael,

Try looking at
http://dev.mysql.com/doc/refman/4.1/en/server-system-variables.html more
specifically the connect-timeout variable. You should use SHOW VARIABLES
LIKE %connect%; and check the value.

It maybe this and you can stretch it out further if you need to.

Regards



I tried lengthening the connection timeout but it doesn't seem to be 
working.  Here is my ROOT.xml configuration:


Context path= docBase=/home/tomcat/applications/ debug=0 
reloadable=true 

   Resource name=jdbc/ type=javax.sql.DataSource
 auth=Container driverClassName=com.mysql.jdbc.Driver
 url=jdbc:mysql://localhost/hostname?autoReconnect=true
 username= password=
 maxActive=8 maxIdle=-1 maxWait=1 /
/Context

Is there any way to keep a connection alive indefinitely?  I thought the 
autoReconnect would do the trick.




Michael,

There really is no way to keep a connection alive indefitely, and I'm 
not aware of compelling reasons to do so for many reasons. First, it 
consumes resources that aren't needed if the connection is sitting idle, 
and second, it increases the risk that network issues, or server 
restarts will cause your application to crash.


It takes very little time (on the order of a few milliseconds) to create 
a JDBC connection to MySQL, so you should set your connection pool 

Re: Connection problem after long idle periods

2006-02-09 Thread Michael Lai

David Logan wrote:


Michael Lai wrote:

I am currently using MySQL 5.0.15 with mysql-connector-java-3.1.11.  
I can access the database from my JSPs with no problem except for one 
small issue.  After a long delay (usually overnight), when someone 
first tries to access the database, I would get the following error:


Communications link failure due to underlying exception: ** BEGIN 
NESTED EXCEPTION ** java.net.SocketException MESSAGE: Broken pipe 
STACKTRACE: java.net.SocketException: Broken pipe at 
java.net.SocketOutputStream.socketWrite0(Native Method) at 
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) 
at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at 
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) 
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) 
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2690) at 
com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2619) at 
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1552) at 
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666) at 
com.mysql.jdbc.Connection.execSQL(Connection.java:2978) at 
com.mysql.jdbc.Connection.execSQL(Connection.java:2902) at 
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:933) 
at 
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1027) 
at 
org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) 
at 
org.apache.jsp.processLogin_jsp._jspService(org.apache.jsp.processLogin_jsp:81) 
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322) 
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) 
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) 
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) 
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) 
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) 
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) 
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) 
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) 
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) 
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) 
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) 
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) 
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) 
at java.lang.Thread.run(Thread.java:595) ** END NESTED EXCEPTION ** 
Last packet sent to the server was 0 ms ago.


But afterwards, on the second and subsequent attempts, the database 
runs fine.  It is only the first try after a long idle period that I 
get this error message.  I am not sure how to fix this.  I am 
guessing that the database connection is down after a long idle 
period and have to recreate a connection first after the first try.



Hi Michael,

Try looking at
http://dev.mysql.com/doc/refman/4.1/en/server-system-variables.html more
specifically the connect-timeout variable. You should use SHOW VARIABLES
LIKE %connect%; and check the value.

It maybe this and you can stretch it out further if you need to.

Regards



I tried lengthening the connection timeout but it doesn't seem to be 
working.  Here is my ROOT.xml configuration:


Context path= docBase=/home/tomcat/applications/ debug=0 
reloadable=true 

   Resource name=jdbc/ type=javax.sql.DataSource
 auth=Container driverClassName=com.mysql.jdbc.Driver
 url=jdbc:mysql://localhost/hostname?autoReconnect=true
 username= password=
 maxActive=8 maxIdle=-1 maxWait=1 /
/Context

Is there any way to keep a connection alive indefinitely?  I thought the 
autoReconnect would do the trick.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Connection problem after long idle periods

2006-02-01 Thread David Logan

Michael Lai wrote:

I am currently using MySQL 5.0.15 with mysql-connector-java-3.1.11.  I 
can access the database from my JSPs with no problem except for one 
small issue.  After a long delay (usually overnight), when someone 
first tries to access the database, I would get the following error:


Communications link failure due to underlying exception: ** BEGIN 
NESTED EXCEPTION ** java.net.SocketException MESSAGE: Broken pipe 
STACKTRACE: java.net.SocketException: Broken pipe at 
java.net.SocketOutputStream.socketWrite0(Native Method) at 
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at 
java.net.SocketOutputStream.write(SocketOutputStream.java:136) at 
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) 
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) 
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2690) at 
com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2619) at 
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1552) at 
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666) at 
com.mysql.jdbc.Connection.execSQL(Connection.java:2978) at 
com.mysql.jdbc.Connection.execSQL(Connection.java:2902) at 
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:933) 
at 
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1027) 
at 
org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) 
at 
org.apache.jsp.processLogin_jsp._jspService(org.apache.jsp.processLogin_jsp:81) 
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322) 
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) 
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) 
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) 
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) 
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) 
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) 
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) 
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) 
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) 
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) 
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) 
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) 
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) 
at java.lang.Thread.run(Thread.java:595) ** END NESTED EXCEPTION ** 
Last packet sent to the server was 0 ms ago.


But afterwards, on the second and subsequent attempts, the database 
runs fine.  It is only the first try after a long idle period that I 
get this error message.  I am not sure how to fix this.  I am guessing 
that the database connection is down after a long idle period and have 
to recreate a connection first after the first try.



Hi Michael,

Try looking at
http://dev.mysql.com/doc/refman/4.1/en/server-system-variables.html more
specifically the connect-timeout variable. You should use SHOW VARIABLES
LIKE %connect%; and check the value.

It maybe this and you can stretch it out further if you need to.

Regards

--

David Logan
South Australia

when in trouble, or in doubt
run in circles, scream and shout



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Connection Problem

2005-11-18 Thread Michael Stassen

Tripp Bishop wrote:

Hello all,

Suddenly in the last hour or so the connection speed
between our webserver and database server has
skyrocketed to the point that our site is no longer
usable! Just trying to connection via the mysql client
takes a long time. Once the connection is established,
however, queries seem to execute in a timely fashion.
As far as we can tell the network connection between
the two boxes is fine (at least testing by ping OK)
and again, once connected everything seems fine.


It's hard to be sure without knowing more, but if the network is working, and 
mysql works fine once connected, it sounds like it might be a DNS problem. 
Often the solution is to list hosts by IP rather than hostname in the mysql user 
table, and run mysqld with --skip-name-resolve.  See 
http://dev.mysql.com/doc/refman/5.0/en/access-denied.html, about a third of 
the way down, for some hints about DNS problems.



We've seen some errors in our logs that state: Can't
connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock'. Why would php
mysql_connect be trying to connect to the local MySQL
Server? Our connection string should point it to the
db server.


Which logs?  Are you sure this is the same problem?  What is the connection 
string?  Do you capture error messages from mysql in your php script?



We're using php 4.3.9 and MySQL 4.0.20.

Thanks for any help,

Tripp



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Connection Problem

2005-11-18 Thread Tripp Bishop
Michael, you hit the nail on the head. We added
--skip-name-resolve and changed our connnection string
to use the IP instead of FQDN and now things are
working fine. It must have been something with our
DNS/ISP since we changed nothing and that stuff is out
of our control.

The other thing was captured from our PHP logs. Not
sure what that's on about. We'll just have to monitor
it and see if pattern develops.

Thanks for your help.

Cheers,

Tripp

--- Michael Stassen [EMAIL PROTECTED]
wrote:

 Tripp Bishop wrote:
  Hello all,
  
  Suddenly in the last hour or so the connection
 speed
  between our webserver and database server has
  skyrocketed to the point that our site is no
 longer
  usable! Just trying to connection via the mysql
 client
  takes a long time. Once the connection is
 established,
  however, queries seem to execute in a timely
 fashion.
  As far as we can tell the network connection
 between
  the two boxes is fine (at least testing by ping
 OK)
  and again, once connected everything seems fine.
 
 It's hard to be sure without knowing more, but if
 the network is working, and 
 mysql works fine once connected, it sounds like it
 might be a DNS problem. 
 Often the solution is to list hosts by IP rather
 than hostname in the mysql user 
 table, and run mysqld with --skip-name-resolve.  See
 

http://dev.mysql.com/doc/refman/5.0/en/access-denied.html,
 about a third of 
 the way down, for some hints about DNS problems.
 
  We've seen some errors in our logs that state:
 Can't
  connect to local MySQL server through socket
  '/var/lib/mysql/mysql.sock'. Why would php
  mysql_connect be trying to connect to the local
 MySQL
  Server? Our connection string should point it to
 the
  db server.
 
 Which logs?  Are you sure this is the same problem? 
 What is the connection 
 string?  Do you capture error messages from mysql in
 your php script?
 
  We're using php 4.3.9 and MySQL 4.0.20.
  
  Thanks for any help,
  
  Tripp
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:   

http://lists.mysql.com/[EMAIL PROTECTED]
 
 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Connection problem

2005-05-24 Thread Warren Young

razat gupta wrote:


But it gives an exception on the reach of 150 connections.It should
allow us to create almost 500 connection.


Use netstat on the server to find out how many connections are actually 
in use.  You may find that your program is not properly closing down 
connnections, for instance, leaving them in various WAIT states 
(TIME_WAIT, FIN_WAIT1...etc.).  If old connections are not being 
completely cleaned up, they can count against that 500 limit.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: connection problem with 4.1.7

2004-11-09 Thread P.V.Anthony
P.V.Anthony wrote:
Hi,
I am having an intermitten connection problem with MySQL 4.1.7 .
Here is the setup.
Intel P4 with HT
Fedora Core 1 kernel 2.4.27 smp
MySQL version 4.1.7 (RPM install from mysql.org)
Qmail with vpopmail using mysql (www.qmailtoaster.com)
Sometimes I cannot login to qmail to check mail. Using thunderbird or 
even webmail.

Only way to solve the problem is to restart MySQL. Then everything is 
ok. After maybe 2 hours the same problem again.

I am concluding that this is a MySQL problem because other apps that use 
 MySQL also shows problems.

qmail vpopmail is using socket and my cms (WebGUI) is using tcp to connect.
I have tried to check the logs at /var/lib/mysql. But do not see 
anything any error. I do see a warning like this,
041106  9:50:59 [Warning] Asked for 196608 thread stack, but got 126976

The strange thing is that I can still connect to MySQL using webmin.
Is there any other thing I can do to find out what is causing the 
problem? Maybe I have made some silly mistake.

Please advice and help.
P.V.Anthony
Problem solved.
As usually it was my mistake.
In the content management system that I used, I set the connection to 
the database to be presistent or pooling. Something like that.

Once I set it back to normal, that is not to have persistent 
connections, all was solved.

It seems that there was too many connections and it just did not allow 
any more connections.

Sorry to have troubled everyone. It was my mistake. It was warned in the 
documentation in the CMS.

I found the problem by using the following command.
# mysqladmin -u root -ppassword processlist
Thanks to everyone who helped.
P.V.Anthony
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: Connection problem!!! Windows to Linux

2003-07-16 Thread Rudy Metzger
If you manually updated the tables, use flush privileges to inform the
DB server of your changes.

Cheers
/rudy

-Original Message-
From: Egor Egorov [mailto:[EMAIL PROTECTED] 
Sent: woensdag 16 juli 2003 11:23
To: [EMAIL PROTECTED]
Subject: Re: Connection problem!!! Windows to Linux

Aric Cheah [EMAIL PROTECTED] wrote:
 
 I wrote a program  application for windows which can add and delete
data 
 from this application, it working fine with my own MySQL install on
the 
 same windows OS.. Now I try to change the connection this dayabase to 
 the server whihc runnign under linux, and create the same database,
same 
 user and password. But when I connect the error message said: 
 [MySQL][ODBC 3.51 Driver] Host'219.95.155.119' is not allowed to 
 connect to this MYSQL Server.
 
 But form the database, I added the host %, means hsould be allow any

 host... anyone can help me on this? the application I wrote will be 
 using with dynamic IP everytime user dial-up to the internet connect..

How did you give permissions? Did you use GRANT statement or edit system
tables manually? Show me the output of SHOW GRANTS for this user.



-- 
For technical support contracts, goto
https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Connection problem!!! Windows to Linux

2003-07-16 Thread Rob A. Brahier
Aric,
Are you running the linux version of your database on a shared web host?
Some web hosts prevent you from using % as a host identifier for security
reasons.  I would also check to see if the permissions were defined at the
proper level (in other words, have you set up access prvis for a specific
database only, or did you grant access to all databases?)  Globally-defined
privileges will be listed in the user table of the mysql database and
permissions set for a specific DB will be in the db table.
You might also check that the mysql server is not protected by a firewall
(ask your web host.)  One last thing to check:  The hostname identifier must
be surrounded by either single or double quotes, NOT backticks.  The
following is an example that works under MySQL 4.0.13:

grant all on *.* to myusername@'%' identified by 'mypassword';

I hope that helps--I don't normally connect to MySQL through ODBC.


-Rob

-Original Message-
From: Aric Cheah [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 16, 2003 3:36 AM
To: [EMAIL PROTECTED]
Subject: Connection problem!!! Windows to Linux


Hi there:

I need URGENT help about this ..

I wrote a program  application for windows which can add and delete data
from this application, it working fine with my own MySQL install on the
same windows OS.. Now I try to change the connection this dayabase to
the server whihc runnign under linux, and create the same database, same
user and password. But when I connect the error message said:
 [MySQL][ODBC 3.51 Driver] Host'219.95.155.119' is not allowed to
connect to this MYSQL Server.

But form the database, I added the host %, means hsould be allow any
host... anyone can help me on this? the application I wrote will be
using with dynamic IP everytime user dial-up to the internet connect..

wish to hear some help soon..



--

Best,

Aric Cheah





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Connection Problem

2002-05-27 Thread Mike(mickalo)Blezien

Will,

In your $dbh connection handler, you need to change the host=localhost and
database= to just localhost and the database name.

$dbh = DBI-connect (DBI:mysql:localhost;database_name,
 **, ***, {PrintError = 0, RaiseError = 1});

On Fri, 24 May 2002 16:43:50 +, Will K. [EMAIL PROTECTED]   wrote:

I am trying to get an online database set up and running, but I keep getting 
error messages at login.

Here are two sample scripts I have been running (both are from Paul DuBois' 
book MySQL and Perl for the Web).

## SCRIPT 1 ##

#! /usr/bin/perl -w
# intro4.pl - generate a Web page using the CGI.pm object-based interface

use strict;
use CGI;
my $cgi = new CGI;
print $cgi-header (),
$cgi-start_html (My Page Title),
$cgi-p (My page body),
$cgi-end_html ();
exit (0);

## SCRIPT 2 ##

#! /usr/bin/perl -w
# intro6.pl - connect to MySQL, retrieve data, write plain text output
use strict;
use DBI;
use CGI qw(:standard);

my ($dbh, $sth, $count);
$dbh = DBI-connect (DBI:mysql:host=localhost;database=***,
   **, ***, {PrintError = 0, RaiseError = 1});
$sth = $dbh-prepare (SELECT name, wins, losses FROM teams);
$sth-execute ();
$count = 0;
while (my @val = $sth-fetchrow_array ())
{

Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-
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 mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Connection Problem - We're almost there...

2001-12-10 Thread Sinisa Milivojevic

Dr. Randy Frid writes:
 I recently wrote in that I've tried everything in the book to connect to
 MySQL but I'm still getting the infamous socket (111) error.  I've had a
 few good suggestions and I think we are almost there.
 
 Here's where I am.
 
 With MySQLGUI trying to connect, I changed the host from localhost to
 127.0.0.1 in my.cnf.
 
 Now I get Host apache is not allowed to connect to this MySQL database.
 (I call my server apache)
 
 Any ideas now?  Seems to me to definately relate to a permissions problem.
 
 Thanks everyone, for all your help.  I need it.
 
 Cheers, Randy

You should GRANT user to log from host apache :

grant ... to nobody@apache 

or ... to nobody@% (to log from any host).

-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   www.mysql.com


-
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




Re: Connection problem

2001-10-30 Thread John Barton

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

check mysql.user, you probably have permission for franck@localhost, which
succeeds when you omit the -h, but no permission for
[EMAIL PROTECTED], so you fail when you specify that is where you
are coming from.

John Barton
[EMAIL PROTECTED]
http://jbarton.technicalworks.net

On Tue, 30 Oct 2001, COLLINEAU Franck FTRD/DMI/TAM wrote:

 Hi!

 When i type: mysql -u franck -p then my password, it's ok.

 My machine's name is r-lx-collineau

 When i type mysql - h r-lx-collineau -u franck -p then my password, i have
 this message:
 ERROR 1130: host 'r-lx-collineau' is not allowed to connect to this MySQL
 server

 Can anybody help me ?


 Franck

 -
 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

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE73u4tFllLbUnOIMARAioTAJoDH4Av4CtM54YAXX/gFlycDi34VgCdHohi
OHy/88V+xUTrBMeJRtLqe5k=
=l46z
-END PGP SIGNATURE-



-
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




Re: Connection problem

2001-10-30 Thread Lazy Dumbness

MYSQL
Hi!

When i type: mysql -u franck -p then my password, it's ok.

My machine's name is r-lx-collineau

When i type mysql - h r-lx-collineau -u franck -p then my password, i have
this message:
ERROR 1130: host 'r-lx-collineau' is not allowed to connect to this MySQL
server
   I think the host name 'r-lx-collineau' must have grant privilege in 
user(mysql) table.
So,first,I advise you use 
shell mysql -h localhost -u franck -p
connected to you database.If it work.Then,you must insert a record into user(mysql) 
table which grant you privilege connect to database from a host named 
'r-lx-collineau'.
Good luck!


Can anybody help me ?


Franck

-
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

= = = = = = = = = = = = = = = = = = = =
   

ÖÂ
Àñ£¡

   Lazy Dumbness
   [EMAIL PROTECTED]
   2001-10-31 

= = = = = = = = = = = = = = = = = = = = 


ÖÂ
Àñ£¡
 
   Lazy Dumbness
   [EMAIL PROTECTED]
2001-10-31 



-
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