Dear All,
After restarting the Machine, JIRA wouldn't connect to mySQL Database anymore. If i try to connect manually, the output says the following:
ERROR 2002 (HY000): Can't connect to local MySQL Server through Socket '/var/lib/mysql/mysql.sock' (111)
I haven't changed anything. Only shutdown, then making an Image of the Machine and after that booting up.
Can anyone help me?
Best Regards,
Daniel Broz
Usually means mysql isn't running.
Try logging into the database using the mysql client tools to verify that.
@Nic Brough:
I have tried the connection manually over the mysql Client:
mysql -h localhost -u user -p
But it fails with the output above. Could it be something with localhost and the address 127.0.0.1?
@Mathias Liefke:
This is my config.xml:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please check the basedir in /etc/my.cnf. Try to comment out the basedir setting and restart your mysql service.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oops. I forgot. Can you check that MySQL is actually running? You get that error a lot when it's not running. Try "ps -ef | grep -i my"
Possibly, but I'm not sure. Could you also try
mysql -h 127.0.0.1 -u user -p
And
mysql -h ::1 -u user -p
And check the error messages carefully.
(Your Jira config looks absolutely fine, this is a problem with mysql connecting locally. It's a lot easier to debug with the mysql client than Jira)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic:
I have tried everything you suggested, but without success. Unfortunately!
MySQL is not running. IPv6 (::1) is an Unknown Host and to 127.0.0.1 the client can't connect.
Here are my Results:
@Mathias:
I have checked /etc/my.cnf. But I have no BaseDir. Only a DataDir.
Here is the File:
Cheers,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Er, well, that's a dead giveaway
>MySQL is not running.
You can't connect to a service that isn't running. Because it isn't running.
You need to start MySQL and retest.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic:
This was only a Summary of the output from the Command you have given and i should execute.
I suppose that the Result is that MySQL is not running. What do YOU mean about the output?
Otherwise i have tried to start the mysql service manually. This is the Result:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The command I gave you (ps -ef | grep -i my) clearly states that there are no processes with "mysql" in their name/description running.
MySQL server almost always runs at least one process with mysqld in the name of it, unless you've deliberately hacked it to run with a totally different name.
The service script is checking the wrong thing, probably a lock from an improper shutdown
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I understand. Thanks for your explanation.
And no.. I don't have hacked mysql to run with a different name. :-)
How can i clean the Lock? Is there a process i can kill oder delete a File, that lockdown the Folder or something else?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, there's no processes to kill, because the server isn't running.
The situation you're in usually happens when the machine shuts down too "hard" for MySQL to stop in time, or you kill the mysql process with violence, not giving it enough time to clean up.
The first thing I'd try is "mv /var/lib/mysql/mysql.sock ~" - hopefully, that is the only hangover left, and that's what's blocking it. If I'm right about that, then your "./mysqld start" should restart the service and clean up anything else that is lying around. Before using it though, I'd read the logs to see if there are any warnings (they're usually quite good - they'll ask you to restart if there's any need to)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have resolved the Issue.
Others with the same Problem, should do the followinig:
1. Rename "mysql.sock" to "mysql.sock.bak" (/var/lib/mysql)
2. Start the Service again: "service mysqld start"
3. Try to connect: mysql -h localhost -u user -p
4. Be happy! :-)
But one Thing you have to do additional. If you get the Message, that Jira is locked, you have to delete the File ".jira-home.lock" at the Jira Home Folder. Finally you have to restart the Server and all is fine again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel,
Although they are important, indeed this sock and lock files are a nightmare sometimes.
Thanks for sharing your resolution with us!
Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please post your dbconfig.xml. Perhaps there is a configuration error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.