error: 'Lost connection to MySQL server during query'

Ask a Question related to MySQL, Design and Development.

  1. #1

    Default error: 'Lost connection to MySQL server during query'

    I have tried installing MySQL on RedHat 9 using instructions in
    INSTALL-BINARY and am getting the following error when trying to finish
    installing and testing MySQL :-

    ~~~~
    $ ./bin/mysqladmin -u root -h yyyyyyyy.com password 'xxxxxxxx'

    ./bin/mysqladmin: connect to server at 'yyyyyyyy.com' failed
    error: 'Lost connection to MySQL server during query'
    ~~~~

    The previous command :-

    ./bin/mysqladmin -u root password 'xxxxxxxx'

    worked fine.

    Hope you can help,

    Aaron


    Aaron Gray Guest

  2. Similar Questions and Discussions

    1. ERROR 2013 (HY000): Lost connection to MySQL server during query
      Hi to everybody, I have upgrade to mysql 5.0.18 my linux box and when I'm trying to make any command in this table: select * from PROGETTO;...
    2. #26490 [Com]: Lost connection to MySQL server during query
      ID: 26490 Comment by: claudelfino at hotmail dot com Reported By: chris dot noden at monstermob dot com Status: ...
    3. Lost connection to MySQL server during query
      I have a script that is processing data from a single table and splitting it into smaller normalized tables. The script takes anywhere...
    4. Error 2013 problem, Lost connection to MySQL during query. (InnoDB)
      Hello, I get an error: "Error 2013 problem, Lost connection to MySQL during query" and the MySQL service stops when I run an SQL statement:...
    5. [PHP] Lost Connection to MySQL server during query
      Are you using mysql_pconnect or just mysql_connect? Donald Tyler wrote:
  3. #2

    Default Re: error: 'Lost connection to MySQL server during query'

    > Check your firewall settings,

    Not the firewall :(
    > check that mysql is actually listening on
    > a network port rather than only a unix socket.
    How do I do that ?

    Aaron


    Aaron Gray Guest

  4. #3

    Default Re: error: 'Lost connection to MySQL server during query'


    "Aaron Gray" <ang.usenet@gmail.com> ha scritto nel messaggio
    news:45ub7rF8bakrU1@individual.net...
    >> check that mysql is actually listening on
    >> a network port rather than only a unix socket.
    >
    > How do I do that ?
    netstat -an | grep "3306.*LISTEN"

    .... change the port, if you're not using the default.


    Regards,
    Dimitre


    DR Guest

  5. #4

    Default Re: error: 'Lost connection to MySQL server during query'

    > netstat -an | grep "3306.*LISTEN"
    >
    > ... change the port, if you're not using the default.
    It returns :-

    tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN

    should that not be 127.0.0.1 ???

    Aaron


    Aaron Gray Guest

  6. #5

    Default Re: error: 'Lost connection to MySQL server during query'

    > It returns :-
    >
    > tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
    >
    > should that not be 127.0.0.1 ???
    Oooh, MS ....
    I *suppose* 0.0.0.0 means all network interfaces(loopback 127.0.0.1
    included).


    Regards,
    Dimitre


    DR Guest

  7. #6

    Default Re: error: 'Lost connection to MySQL server during query'

    "DR" <dr@invalid.address> wrote in message
    news:43fa0e98$0$15785$14726298@news.sunsite.dk...
    > Oooh, MS ....
    The OP said he was running MySQL on Redhat 9 Linux.
    On Linux, one might also try:

    $ lsof -i :3306

    Regards,
    Bill K.


    Bill Karwin Guest

  8. #7

    Default Re: error: 'Lost connection to MySQL server during query'

    > The OP said he was running MySQL on Redhat 9 Linux.

    You're right,
    all interfaces are represented as 0.0.0.0 on Linux too.


    Regards,
    Dimitre


    DR Guest

  9. #8

    Default Re: error: 'Lost connection to MySQL server during query'

    "Aaron Gray" <ang.usenet@gmail.com> ha scritto nel messaggio
    news:45sk72F8ab91U1@individual.net...
    >I have tried installing MySQL on RedHat 9 using instructions in
    >INSTALL-BINARY and am getting the following error when trying to finish
    >installing and testing MySQL :-
    >
    > ~~~~
    > $ ./bin/mysqladmin -u root -h yyyyyyyy.com password 'xxxxxxxx'
    >
    > ./bin/mysqladmin: connect to server at 'yyyyyyyy.com' failed
    > error: 'Lost connection to MySQL server during query'
    > ~~~~
    >
    > The previous command :-
    >
    > ./bin/mysqladmin -u root password 'xxxxxxxx'
    >
    > worked fine.
    Did you check the official docs?

    [url]http://dev.mysql.com/doc/refman/5.0/en/gone-away.html[/url]

    You can also post the output from the following command:

    strace -f ./bin/mysqladmin -u root -h yyyyyyyy.com password 'xxxxxxxx'


    Regards,
    Dimitre



    DR Guest

  10. #9

    Default Re: error: 'Lost connection to MySQL server during query'

    > strace -f ./bin/mysqladmin -u root -h yyyyyyyy.com password 'xxxxxxxx'

    Are that reveals all :)

    Solved it !!!

    'strace' is a good cmmand.

    Many thanks,

    Aaron


    Aaron Gray Guest

  11. #10

    Default Re: error: 'Lost connection to MySQL server during query'

    "Aaron Gray" <ang.usenet@gmail.com> ha scritto nel messaggio
    news:45uu4oF8nctkU1@individual.net...
    >> strace -f ./bin/mysqladmin -u root -h yyyyyyyy.com password 'xxxxxxxx'
    >
    > Are that reveals all :)
    >
    > Solved it !!!
    DNS?


    Regards,
    Dimitre


    DR Guest

  12. #11

    Default Re: error: 'Lost connection to MySQL server during query'

    > DNS?

    Yep :)

    Aaron


    Aaron Gray Guest

  13. #12

    Default Re: error: 'Lost connection to MySQL server during query'

    >> Solved it !!!
    >
    > DNS?
    There was a DNS problem but now thats solved. BUT ...

    Still not working, should have not said I solved it :(

    ~~~~~
    connect(3, {sa_family=AF_INET, sin_port=htons(3306),
    sin_addr=inet_addr("xx.xx.xx.xx")}, 16) = -1 EINPROGRESS (Operation now in
    progress)
    fcntl64(3, F_SETFL, O_RDWR) = 0
    poll([{fd=3, events=POLLIN|POLLPRI, revents=POLLIN|POLLERR|POLLHUP}], 1,
    43200000) = 1
    brk(0) = 0x8262000
    brk(0x8265000) = 0x8265000
    setsockopt(3, SOL_IP, IP_TOS, [8], 4) = 0
    setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = 0
    setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
    poll([{fd=3, events=POLLIN, revents=POLLIN|POLLERR|POLLHUP}], 1, 43200000) =
    1
    read(3, 0x8261ff0, 4) = -1 ECONNREFUSED (Connection
    refused)
    shutdown(3, 2 /* send and receive */) = -1 ENOTCONN (Transport endpoint is
    not connected)
    close(3) = 0
    write(2, "\7", 1) = 1
    write(2, "./bin/mysqladmin", 16./bin/mysqladmin) = 16
    write(2, ": ", 2: ) = 2
    write(2, "connect to server at \'yyyyyyyy."..., 97connect to server at
    yyyyyyyy.com' failed
    error: 'Lost connection to MySQL server during query') = 97
    write(2, "\n", 1
    ) = 1
    exit_group(1) = ?
    ~~~~~

    Getting 'ECONNREFUSED (Connection refused)' !

    Could it be a password related thing ?

    Aaron



    Aaron Gray Guest

  14. #13

    Default Re: error: 'Lost connection to MySQL server during query'

    > Still not working, should have not said I solved it :(

    I believe it is a local loopback problem with the sites router !!!

    Aaron


    Aaron Gray Guest

  15. #14

    Default Re: error: 'Lost connection to MySQL server during query'

    "Aaron Gray" <ang.usenet@gmail.com> ha scritto nel messaggio
    news:45v2elF8fe3bU1@individual.net...
    >>> Solved it !!!
    >>
    >> DNS?
    >
    > There was a DNS problem but now thats solved. BUT ...
    >
    > Still not working, should have not said I solved it :(
    >
    > ~~~~~
    > connect(3, {sa_family=AF_INET, sin_port=htons(3306),
    > sin_addr=inet_addr("xx.xx.xx.xx")}, 16) = -1 EINPROGRESS (Operation now in
    > progress)
    > fcntl64(3, F_SETFL, O_RDWR) = 0
    > poll([{fd=3, events=POLLIN|POLLPRI, revents=POLLIN|POLLERR|POLLHUP}], 1,
    > 43200000) = 1
    > brk(0) = 0x8262000
    > brk(0x8265000) = 0x8265000
    > setsockopt(3, SOL_IP, IP_TOS, [8], 4) = 0
    > setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = 0
    > setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
    > poll([{fd=3, events=POLLIN, revents=POLLIN|POLLERR|POLLHUP}], 1, 43200000)
    > =
    > 1
    > read(3, 0x8261ff0, 4) = -1 ECONNREFUSED (Connection
    > refused)
    > shutdown(3, 2 /* send and receive */) = -1 ENOTCONN (Transport endpoint
    > is
    > not connected)
    > close(3) = 0
    > write(2, "\7", 1) = 1
    > write(2, "./bin/mysqladmin", 16./bin/mysqladmin) = 16
    > write(2, ": ", 2: ) = 2
    > write(2, "connect to server at \'yyyyyyyy."..., 97connect to server at
    > yyyyyyyy.com' failed
    > error: 'Lost connection to MySQL server during query') = 97
    > write(2, "\n", 1
    > ) = 1
    > exit_group(1) = ?
    > ~~~~~
    You get ECONNREFUSED when you try to communicate with xx.xx.xx.xx on port
    3306.
    Do you run the command from a remote machine?


    Regards,
    Dimitre


    DR Guest

  16. #15

    Default Re: error: 'Lost connection to MySQL server during query'

    > You get ECONNREFUSED when you try to communicate with xx.xx.xx.xx on port
    > 3306.
    > Do you run the command from a remote machine?
    No the local machine. I will install MySQL on our other server and try it
    remotely.

    Many thanks for bearing with me. I have a bad cold at present so will
    probably not be upto doing the second install for a few days.

    Your help is well appreciated.

    Aaron


    Aaron Gray Guest

  17. #16

    Default Re: error: 'Lost connection to MySQL server during query'

    > ~~~~
    > $ ./bin/mysqladmin -u root -h yyyyyyyy.com password 'xxxxxxxx'
    >
    > ./bin/mysqladmin: connect to server at 'yyyyyyyy.com' failed
    > error: 'Lost connection to MySQL server during query'
    > ~~~~
    ./bin/mysqladmin -u root -h yyyyyyyy.com -p password 'xxxxxxxxx'

    seems to work fine on the system where the router has local loopback.

    Aaron


    Aaron Gray Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139