Solved

Mysql will not start in centos

Posted on 2012-03-24
7
1,564 Views
Last Modified: 2012-03-24
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
0
Comment
Question by:webguy62
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 31

Expert Comment

by:farzanj
ID: 37760932
what does this return to you?
nslookup localhost
0
 
LVL 11

Accepted Solution

by:
jgiordano earned 500 total points
ID: 37760942
has this instance ever started?

try commenting out the  'set-variable=local-infile=0' in the my.cnf file and starting up.
0
 

Author Comment

by:webguy62
ID: 37760959
re:farzan reply:

[root@u7777777771 ~]# nslookup localhost
Server:         10.255.255.4
Address:        10.255.255.4#53

Non-authoritative answer:
Name:   localhost
Address: 127.0.0.1
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:webguy62
ID: 37760963
re jgiordano reply

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

 [mysqld]
set-variable=local-infile=0
local-infile=0
0
 

Author Comment

by:webguy62
ID: 37760966
oh and yes this has started before :)
0
 
LVL 11

Expert Comment

by:jgiordano
ID: 37760971
It looks you have the same variable 2x with the wrong syntax possibly.

I would comment out the line
set-variable=local-infile=0
0
 

Author Closing Comment

by:webguy62
ID: 37760983
I removed al thsos  lines at top of my.cnf stopped and started mysql now al sites back online :)  thanks big time
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
expand ext4 on centos 6 5 53
Migrating a Linux server to VMware 3 106
MySQL limit and not so limited 13 34
WordPress: Debugging from my Windows 10 Desktop 6 61
As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question