Professional Web Applications Themes

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

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 'xx' ./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 'xx' worked fine. Hope you can help, Aaron...

  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 'xx'

    ./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 'xx'

    worked fine.

    Hope you can help,

    Aaron


    Aaron Gray Guest

  2. #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

  3. #3

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


    "Aaron Gray" <ang.usenet> ha scritto nel messaggio
    news:45ub7rF8bakrU1individual.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

  4. #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

  5. #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

  6. #6

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

    "DR" <drinvalid.address> wrote in message
    news:43fa0e98$0$15785$14726298news.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

  7. #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

  8. #8

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

    "Aaron Gray" <ang.usenet> ha scritto nel messaggio
    news:45sk72F8ab91U1individual.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 'xx'
    >
    > ./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 'xx'
    >
    > 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 'xx'


    Regards,
    Dimitre



    DR Guest

  9. #9

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

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

    Are that reveals all :)

    Solved it !!!

    'strace' is a good cmmand.

    Many thanks,

    Aaron


    Aaron Gray Guest

  10. #10

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

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


    Regards,
    Dimitre


    DR Guest

  11. #11

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

    > DNS?

    Yep :)

    Aaron


    Aaron Gray Guest

  12. #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

  13. #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

  14. #14

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

    "Aaron Gray" <ang.usenet> ha scritto nel messaggio
    news:45v2elF8fe3bU1individual.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

  15. #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

  16. #16

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

    > ~~~~
    > $ ./bin/mysqladmin -u root -h yyyyyyyy.com password 'xx'
    >
    > ./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 ''

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

    Aaron


    Aaron Gray Guest

Similar Threads

  1. Replies: 5
    Last Post: September 12th, 10:46 PM
  2. #26490 [Com]: Lost connection to MySQL server during query
    By claudelfino at hotmail dot com in forum PHP Bugs
    Replies: 1
    Last Post: December 15th, 03:46 PM
  3. Lost connection to MySQL server during query
    By Donald Tyler in forum MySQL
    Replies: 1
    Last Post: April 10th, 06:04 PM
  4. Replies: 4
    Last Post: February 4th, 10:54 AM
  5. [PHP] Lost Connection to MySQL server during query
    By Marek Kilimajer in forum PHP Development
    Replies: 1
    Last Post: September 10th, 03:47 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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