• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1621
  • Last Modified:

Mysql will not start in centos

How do I start myql? Log file below

ran command  /etc/init.d/mysqld start ( or restart)

MySQL Daemon failed to start.

[root@u153777777 ~]# /etc/init.d/mysqld restart
Stopping mysqld:                                           [  OK  ]
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]
[root@u157777777 ~]#

[root@u1555551 ~]# mysqladmin -u root -p status
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysq               l/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.s               ock' exists!

site errors

Unable to open PDO connection [wrapped: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Mysql logs:

 [root@u5555551 ~]# tail -n 20 /var/log/mysqld.log
120324 08:05:41 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pi                                   d ended
120324 08:06:27 mysqld_safe Starting mysqld daemon with databases from /va                                   r/lib/mysql
120324  8:06:27 [Note] Plugin 'FEDERATED' is disabled.
120324  8:06:27 InnoDB: The InnoDB memory heap is disabled
120324  8:06:27 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120324  8:06:27 InnoDB: Compressed tables use zlib 1.2.3
120324  8:06:27 InnoDB: Using Linux native AIO
120324  8:06:27 InnoDB: Initializing buffer pool, size = 128.0M
120324  8:06:27 InnoDB: Completed initialization of buffer pool
120324  8:06:27 InnoDB: highest supported file format is Barracuda.
120324  8:06:27  InnoDB: Waiting for the background threads to start
120324  8:06:28 InnoDB: 1.1.6 started; log sequence number 63736076615
120324  8:06:28 /usr/libexec/mysqld: unknown variable 'set-variabl                                   e=local-infile=0'
120324  8:06:28 Aborting

120324  8:06:28  InnoDB: Starting shutdown...
120324  8:06:29  InnoDB: Shutdown completed; log sequence number 637360766                                   15
120324  8:06:29 [Note] /usr/libexec/mysqld: Shutdown complete

120324 08:06:29 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pi                                   d ended
  • 4
  • 2
1 Solution
what does this return to you?
nslookup localhost
has this instance ever started?

try commenting out the  'set-variable=local-infile=0' in the my.cnf file and starting up.
webguy62Author Commented:
re:farzan reply:

[root@u7777777771 ~]# nslookup localhost

Non-authoritative answer:
Name:   localhost
Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

webguy62Author Commented:
re jgiordano reply

at top of config i have all this. should I comment all or can i remove? I have BU :)

webguy62Author Commented:
oh and yes this has started before :)
It looks you have the same variable 2x with the wrong syntax possibly.

I would comment out the line
webguy62Author Commented:
I removed al thsos  lines at top of my.cnf stopped and started mysql now al sites back online :)  thanks big time

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now