Sponsored Content
Operating Systems Linux Red Hat MySQL (mysqld) fails to start! Post 302559475 by dot_pro on Tuesday 27th of September 2011 07:31:34 AM
Old 09-27-2011
MySQL (mysqld) fails to start!

Hello,

I have recently installed MySql and I encourage an error.
I am using Fedora 15 and when I am trying to start mysqld service i am getting
the following error message:
Code:
Starting mysqld (via systemctl):  Job failed. See system logs and 'systemctl status' for details. [FAILED]

If I try to start it from Service Configuration GUI it fails too.

Checking the system logs it just says:
Code:
Sep 27 11:49:11 mp054a systemd[1]: mysqld.service: control process exited, code=exited status=1
Sep 27 11:49:11 mp054a systemd[1]: Unit mysqld.service entered failed state.

If I try to type 'msql' from command line I am getting the following error
msg:
Code:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

I have read about the /etc/my.cnf file and I tried to edit it somehow
but with no success.
My /etc/my.cnf contains the following:
Code:
[mysqld]
#datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
max_connections=125
table_cache=2500
thread_cache_size=100
thread_stack=250K
wait_timeout=10
join_buffer=5M
myisam_sort_buffer_size=15M
query_cache_size=15M
read_rnd_buffer_size=5M
default-character-set=utf8
default-collation=utf8_unicode_ci
character-set-server=utf8
collation-server=utf8_unicode_ci 

[mysql.server]
user=mysql
#basedir=/var/lib
old-passwords = 1

[client]
default-character-set=utf8

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Note that I have commented datadir and basedir. That's because I had the same mysqld problem yesterday and I found online that if I comment them it might work.And indeed the problem solved.
But later I tried to install moodle and I had to make some changes to the permission of some folders over /var/ directory. I had to play a little bit and in the end I manage to figure permissions in such a way that moodle was working. (Note that permission changes have been made after I managed to start mysqld successfully).

Today when I power my computer on and tried to restart httpd and mysqld, the latter one failed.

If I uncomment datadir and basedir mysqld still fails to start.

If I do 'ls -la /var/lib' I am getting the following about mysql:
Code:
drwxr-xr-x.  5 mysql mysql 4096 Sep 27 11:49 mysql

If I do 'ls -la /var/lib/mysql' I am getting the contents of mysql:
Code:
drwxr-xr-x.  5 mysql mysql     4096 Sep 27 11:49 .
drwxr-xr-x. 41 root  root      4096 Sep 26 22:04 ..
-rwxr-xr-x.  1 mysql mysql 35651584 Sep 27 11:49 ibdata1
-rwxr-xr-x.  1 mysql mysql  5242880 Sep 27 11:49 ib_logfile0
-rwxr-xr-x.  1 mysql mysql  5242880 Sep 27 11:49 ib_logfile1
drwxr-xr-x.  2 mysql mysql    20480 Sep 26 17:07 moodle
-rwxr-xr-x.  1 mysql mysql    35556 Sep 27 11:49 mp054a.halls.manchester.ac.uk.err
drwxr-xr-x.  2 mysql mysql     4096 Sep 26 02:29 mysql
drwxr-xr-x.  2 mysql mysql     4096 Sep 26 02:29 performance_schema

I have noticed that if I do 'ls -la /tmp/' I can see the following about mysql.sock:
Code:
lrwxrwxrwx.  1 mysql   mysql        25 Sep 26 03:13 mysql.sock -> /var/lib/mysql/mysql.sock

whereas I cannot find anything about mysql.sock on /var/lib/mysql

I tried to change socket to 'socket=/tmp/mysql.sock' in the my.cnf and
nothing changes.

I am not an expert user on linux. I hope the details I added above can
help you help me Smilie

I would appreciate any help. Thanks in advace!

Last edited by Scott; 09-27-2011 at 11:17 AM.. Reason: Replace Quote tags with Code tags
 

10 More Discussions You Might Find Interesting

1. BSD

mysqld

Hello I installed mysql41 this is the end of the installation but when I try to launch the mysqld daemon it write this: note: LodelServoo is a CMS which need mysql I verify that the dir mysql existed under /var/db, but it doesn't so naively I created it and launch again the mysqld... (4 Replies)
Discussion started by: SoulCoder
4 Replies

2. UNIX for Advanced & Expert Users

XServer Fails to start

I've recently patched my AIX box from ML02 to ML06 and somehow along the way the monitor no longer starts up in GUI mode. Running the command xinit gives me the following errros ioctl Bad file Number 1356- Unable to start the X server I've checked the path variables, the monitor, the lai0... (0 Replies)
Discussion started by: mahartle
0 Replies

3. UNIX for Advanced & Expert Users

mysql would not start: missing mysql.sock

I recently installed mysql-standard-5.0.21-solaris9-sparc-64bit.pkg on a Solaris 9 machine (SunOS 5.9 Generic_118558-19 sun4u sparc SUNW,Ultra-250). The package installation went very smooth, however, starting mysql is a different story. I get the message below everytime I try to start mysql: #... (2 Replies)
Discussion started by: xnightcrawl
2 Replies

4. Programming

MySQL service start error

Hi, I have installed MySql version 5.0.67 in RedHat LINUX version 5. The installation completed successfully. When I am trying to start the service an error occured the error shown below ".......Manager of pid-file quit without updating file" Can anyone help me to fix the problem.... (4 Replies)
Discussion started by: saravanakumar
4 Replies

5. Solaris

ldap client fails to start under solaris 10

I have an issue here with ldap client. It stoped and won't start. What I have got: sadm $ tail /var/adm/messages Apr 16 09:17:24 hostname inetd: libsldap: Status: 2 Mesg: Unable to load configuration '/var/ldap/ldap_client_file' (''). Apr 16 09:17:24 hostname inetd: libsldap: Status: 2 ... (3 Replies)
Discussion started by: aixlover
3 Replies

6. Solaris

How to auto start MySQL server on Opensolaris after rebooting the machine?

Hi, In Linux, I will do it by editing the /etc/rc.d/rc.local . However, I can't find a rc.local file in Opensolaris. So, how can I do it in Opensolaris? I am new to opensolaris, so please teach me step by step. Thanks in advance. (4 Replies)
Discussion started by: AlexCheung
4 Replies

7. UNIX for Dummies Questions & Answers

vsftp in CentOS fails to start

service of vsftpd is not starting .I m using centos 5 please help (2 Replies)
Discussion started by: Raj@Innodata
2 Replies

8. Linux

mysql server start issue

Hi, I have installed mysql in linux box as mysql-5.0.77-4.el5_6.6.. I would like to start the server. But there is no mysql file in this location /etc/init.d/ Please advice how to start the server now !! Thnaks, Mani (5 Replies)
Discussion started by: Mani_apr08
5 Replies

9. UNIX and Linux Applications

MySQL Daemon failed to start - no mysql.sock file

After doing a yum install mysql mysql-server on Fedora 14 I wasn't able to fully install the packages correctly. It installed MySQL 5.1. I was getting the following error when running the: mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)... (3 Replies)
Discussion started by: jastanle84
3 Replies

10. Homework & Coursework Questions

Mysql missing mysqld.sock (Linux)

I am trying to start a server for a class I am in but... mysql won't start with this error ( ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) ) ---------- Post updated at 03:51 PM ---------- Previous update was at 03:50 PM ---------- ... (2 Replies)
Discussion started by: Slayer939
2 Replies
All times are GMT -4. The time now is 09:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy