MySQL server initialize broken connections?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dmitry Davletbaev

    MySQL server initialize broken connections?

    Hi!

    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 reinitializatio n.

    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
    behaviour?

    Additional information:

    MySQL version: 4.1.9
    Connection type: TCP socket

    Thank you.

    --
    Dmitry Davletbaev.
  • Bart Van der Donck

    #2
    Re: MySQL server initialize broken connections?

    Dmitry Davletbaev wrote:
    [color=blue]
    > 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 reinitializatio n.[/color]

    I don't see anything illogical in this behaviour.

    I'ld say the following is going on (chronologicall y):

    (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
    here).

    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.
    [color=blue]
    > 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 behaviour?[/color]

    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:



    --
    Bart

    Comment

    Working...