+ Post New Thread
Results 1 to 13 of 13
O/S Deployment Thread, Can't connect to mysql database in Technical; Using FOG v0.27, had everything (including multicasting) working fine. Unfortunately this has now all changed! When I start a multicast ...
  1. #1
    jack0w's Avatar
    Join Date
    Jan 2008
    Posts
    123
    Thank Post
    12
    Thanked 4 Times in 4 Posts
    Rep Power
    13

    Can't connect to mysql database

    Using FOG v0.27, had everything (including multicasting) working fine. Unfortunately this has now all changed! When I start a multicast image all clients sit on the blue screen waiting.

    I've found this error in the multicastmanager log:

    Failed to connect to database server, will try again in next iteration.

    If I try to connect to the mysql database from a terminal session on the storage node I recieve the following error:

    ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 0

    I've been through and checked that the mysql password is correct in the config files and am now out of ideas, can anyone help me?!

  2. #2

    Join Date
    Jul 2009
    Posts
    478
    Thank Post
    41
    Thanked 89 Times in 76 Posts
    Rep Power
    50
    have you tried restarting mysql/or the computer hosting fog?

  3. #3
    jack0w's Avatar
    Join Date
    Jan 2008
    Posts
    123
    Thank Post
    12
    Thanked 4 Times in 4 Posts
    Rep Power
    13
    Just tried both, no joy unfortunately

  4. #4


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,657
    Thank Post
    350
    Thanked 789 Times in 710 Posts
    Rep Power
    344
    Some interesting posts on the net about this error.

    Is MySQL running on the same server at FOG and are you using localhost as the db host?

    Does mysql -u username -p

    (insert password)

    work?

  5. #5


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,657
    Thank Post
    350
    Thanked 789 Times in 710 Posts
    Rep Power
    344
    Might be worth checking:

    Speed of network uplink (if it's saturated and connecting to a remote mysql server this could happen)

    May be worth editing my.cnf to increase the timeout from 10 seconds (default) to something higher as apparently this error is badly documented as a timeout!

    Finally, they recommend checking whether the connection is indeed being dropped on the MySQL Server itself, log in as root to mysql using the command in my other post and then type

    show status like 'abort%';

  6. #6
    jack0w's Avatar
    Join Date
    Jan 2008
    Posts
    123
    Thank Post
    12
    Thanked 4 Times in 4 Posts
    Rep Power
    13
    Quote Originally Posted by kmount View Post
    Some interesting posts on the net about this error.

    Is MySQL running on the same server at FOG and are you using localhost as the db host?

    Does mysql -u username -p

    (insert password)

    work?
    MySQL isn't running on the same server, I've changed the db host to the servers ip address and removed the skip-networking bit as per some instructions I found a while ago.

    If I run the above command on the server hosting the db it works fine, its just from the remote server it fails

    I've just tried increasing the timeout as per your other post but unfortunately no joy

    Running the command from your second post gave me this:

    Variable_Name Value

    Aborted_clients 1
    Aborted_connects 8982

  7. #7


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,657
    Thank Post
    350
    Thanked 789 Times in 710 Posts
    Rep Power
    344
    From the remote box you'll need -h

    mysql -h ipofmysqlserverbox -u username -p

    Have a look for my.cnf (probably in /etc) and try upping the connect_timeout in there.

    Which distro are you using and I'll see if I can find where it lives.

    I've been reading from here mostly if you want a nose there.

  8. #8
    jack0w's Avatar
    Join Date
    Jan 2008
    Posts
    123
    Thank Post
    12
    Thanked 4 Times in 4 Posts
    Rep Power
    13
    Thanks for your help kmount

    I'm running Ubuntu 9.04

  9. #9


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,657
    Thank Post
    350
    Thanked 789 Times in 710 Posts
    Rep Power
    344
    Run

    mysql -u root -p (on the local box is fine) or use -h remotely.

    In the mysql shell type "show variables;"

    Let's just check what your connect_timeout is set to. (mine is set to 5)

  10. #10
    jack0w's Avatar
    Join Date
    Jan 2008
    Posts
    123
    Thank Post
    12
    Thanked 4 Times in 4 Posts
    Rep Power
    13
    Quote Originally Posted by kmount View Post
    Run

    mysql -u root -p (on the local box is fine) or use -h remotely.

    In the mysql shell type "show variables;"

    Let's just check what your connect_timeout is set to. (mine is set to 5)
    Just run this from the local box, timeout is currently set to 10.

  11. #11


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,657
    Thank Post
    350
    Thanked 789 Times in 710 Posts
    Rep Power
    344
    I'm sure I posted an update to this thread with instructions on how to up this!

    (eyes the database)

    ok, in /etc/my.cnf under the [mysqld] section put

    connect_timeout = 5000

    then save it, restart mysql with (/etc/init.d/mysql restart) and try it again to make sure the timeout has increased to that silly high number.

    (then try your fog stuff)

    If it still doesn't work I'm a little stumped!

  12. Thanks to kmount from:

    jack0w (28th October 2009)

  13. #12
    jack0w's Avatar
    Join Date
    Jan 2008
    Posts
    123
    Thank Post
    12
    Thanked 4 Times in 4 Posts
    Rep Power
    13
    Quote Originally Posted by kmount View Post
    I'm sure I posted an update to this thread with instructions on how to up this!

    (eyes the database)

    ok, in /etc/my.cnf under the [mysqld] section put

    connect_timeout = 5000

    then save it, restart mysql with (/etc/init.d/mysql restart) and try it again to make sure the timeout has increased to that silly high number.

    (then try your fog stuff)

    If it still doesn't work I'm a little stumped!
    Kmount you're a legend! All working fine now.

    Thanks so much for your help

  14. #13


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,657
    Thank Post
    350
    Thanked 789 Times in 710 Posts
    Rep Power
    344
    You're very welcome mate, might be worth dropping that down a bit or at least making sure mysql isn't publicly accessible as currently it will now wait 5000 seconds before closing off / rejecting an invalid connection (ie, a telnet host 3306)

    Glad it's working

  15. Thanks to kmount from:

    diggory (25th June 2010)

SHARE:
+ Post New Thread

Similar Threads

  1. Mysql - Track database changes
    By danIT in forum Coding
    Replies: 4
    Last Post: 25th June 2011, 05:46 PM
  2. Scripting the backup of MySQL Database?
    By Quackers in forum Scripts
    Replies: 3
    Last Post: 3rd February 2009, 10:42 PM
  3. Joomla : Unable to Connect to Database
    By deano in forum Web Development
    Replies: 0
    Last Post: 28th September 2007, 03:09 PM
  4. Creating a new database in php and mysql
    By StewartKnight in forum Web Development
    Replies: 18
    Last Post: 21st February 2007, 08:53 AM
  5. ASP connect to SIMS database
    By ryan_powell in forum MIS Systems
    Replies: 1
    Last Post: 26th October 2006, 06:31 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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