MySQL Problem, What Am I Doing Wrong?
Hello all, I’m trying to figure out a very frustrating issue with my FOG setup. I set up Ubuntu 14 Server from scratch (VirtualBox), and generally followed the instructions [URL=‘http://community.spiceworks.com/how_to/show/78110-fog-1-0-0-on-ubuntu-server-14-04’]here[/URL]. Once FOG 1.0.1 finishes installing, I am able to access it via a web browser, and I everything seems to work fine. After 4-7 minutes, I get the “Cannot connect to database.” message. I’ve been using FOG 0.32 for quite some time, and I’ve triple checked all of the locations where the MySQL password should be, all is well… Is there another location I am missing that also needs to be updated, or can this be another issue entirely?
I re-tried the installation about 20 times in the past 2 days, all with the same result. I’ve tried different versions of Ubuntu as well, same problem. I have FOG 0.32 running successfully on another VirtualBox, so I know it works for me virtually.
Can anyone shed some light, PLEASE???
Okay, here’s my crude but functional workaround…
Since I figured the problem is that the mysql service was being locked out of a file it needed, and restarting the service completely fixes the issue, I changed my Ubuntu server to stop and start the mysql service after boot up. Fairly simple procedure, just do the following:
[CODE]sudo nano /etc/rc.local
In this file, above “exit 0”, type “service mysql restart” (no quotes).
Ctrl X to exit, Y to save, Enter to save to same file.
From that point forward, every time your server reboots, it will automatically bring down and up the SQL service, solving the “Unable to connect to database” error.
Hope this helps someone out there, let me know if anything is unclear!
I’m currently working on different workarounds to resolve this issue. It might be one of those infamous MySQL bugs that sneaks into their releases… Or it might have something to do with the way FOG or the Ubuntu server is loading up services. As far as I can see, a file is being locked from access, and as soon as FOG can’t see it, the “Unable to connect to database” message pops up.
Reuben (and anyone else reading), if you need any help with any of your setup, let me know, I’m glad to help. I’ve set FOG up in a number of different networking environments, and on a few different operating systems…
Reuben Bannister last edited by
Im also having the same problem’s. I’ve reinstalled my Ubuntu about 20 times on site on Friday pulling my hair out!
Hopefully they will get this sorted asap as this was my first time using the software and Im clueless about Linux as well so having to install Ubuntu Workstation then think it was something i was doing wrong to then install Server and find the same issues. Watched the install videos over and over.
This seems to happen after every reboot btw.
silverado last edited by
"Is anyone else experiencing this bug?"
Yes, I am experiencing exactly the same bug. I am also using Ubuntu server 14.04. Restarting MySQL helps.
Update on my own post:
For whatever reason, if I run ‘sudo service mysql stop’, then ‘sudo service mysql start’, everything works perfectly until next reboot. I can add the stop and start to a startup script for my server if need be. Is anyone else experiencing this bug?