Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- MySQL server initialize broken connections?
- Dmitry Davletbaev
May 19, 2005, 6:13 am
rate this thread
I'm working on program that acts as MySQL client. After successful connection
program send queries for a long time. When I stop server mysql_query return
error (no surprise). But when I start server my program recieve information
again without connection reinitialization.
I suppose MySQL server track connections somehow but I didn't find any info
about it in documentation. Can somebody point me to docs or explain this
MySQL version: 4.1.9
Connection type: TCP socket
Re: MySQL server initialize broken connections?
Dmitry Davletbaev wrote:
I don't see anything illogical in this behaviour.
I'ld say the following is going on (chronologically):
(1) Your MySQL client program requests authentication from the user
(or has built-in authentication).
(2) Your MySQL client program uses this authentication info to build
up a connection with the MySQL server. This same authentication info
is sent to the server every time a query is executed.
(3) When authentication is OK, the query will be executed and the
server will respond to the client with a query result set (or an
error, but at least the connection and authorization were successful
Steps (2) and (3) are repeated each time a query is sent. Each query
is authorized separately. Obviously, if mysqld is not running, you
will get an error when sending queries to it. When mysqld runs again
(eg when you have restarted it), queries can be processed again. That
has nothing to do with the client. The client only knows the response
it gets after having sent a request.
All logs should be created in the mysqld data directory. On my system
(MySQL 4.0 on FreeBSD 4) that is /usr/local/var/logs/.
Log tracking is explained in chapter 5.10. of the MySQL Manual:
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum