LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-11-2013, 08:22 PM   #1
ryuker16
LQ Newbie
 
Registered: Apr 2013
Posts: 3

Rep: Reputation: Disabled
Red face MYSQL on Lamp inoperable after IP switch on amazon EC2


I using LAMP on an ec2 with an Elastic IP. I was testing out allocating and associating a new IP address to my Ec2 instance.

I went back to my old one and my website from fine except mysql clear was disconnected.

2-3 hours of linux tutorials and my Mysql daemon has still failed to start.

I've even tried uninstalling and resintally mysql server and mysqld. No luck....

Main problem is mysql.sock is missing....any idea?

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Mysql is the owner and I set chmod to allow the folder to be edited.

Please help....My company's online payment portal is tied to this and it's already been 5 hours!

Here's what my mysqld.log file says:


130412 1:20:29 [Note] Plugin 'FEDERATED' is disabled.
130412 1:20:29 InnoDB: The InnoDB memory heap is disabled
130412 1:20:29 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130412 1:20:29 InnoDB: Compressed tables use zlib 1.2.5
130412 1:20:29 InnoDB: Using Linux native AIO
130412 1:20:29 InnoDB: Initializing buffer pool, size = 128.0M
130412 1:20:29 InnoDB: Completed initialization of buffer pool
130412 1:20:29 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
130412 01:20:29 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

Last edited by ryuker16; 04-11-2013 at 08:34 PM.
 
Old 04-11-2013, 09:35 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
What did you chmod; the mysql.sock's dir or the ibdata1 as shown in error msgs?
If its that urgent, can you ask Amazon?
You could also try the forums over at http://forums.mysql.com/
 
Old 04-11-2013, 10:27 PM   #3
ryuker16
LQ Newbie
 
Registered: Apr 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
What did you chmod; the mysql.sock's dir or the ibdata1 as shown in error msgs?
If its that urgent, can you ask Amazon?
You could also try the forums over at http://forums.mysql.com/
I chmod 755 every relevant directory related to mysql to be safe....no dice. Amazon expects you to pay for support.

Thanks for pointing me in the right direction.
 
Old 04-12-2013, 01:10 PM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by ryuker16 View Post
I chmod 755 every relevant directory related to mysql to be safe....no dice. Amazon expects you to pay for support.

Thanks for pointing me in the right direction.
Here's the right direction,
Warning: it's not a file permission issue.

How is a new EIP going to be a file change / permissions issue? Stop it.

More likely a my.cnf issue...
...around "bind-address = localhost" or the lack of such an entry, Is my guess.
See that "/var/run/mysqld/mysqld.pid ended" - THAT MEANS your mysql-server isn't running.
and My Guess is the bind-address property/element in my.cnf.
 
Old 04-12-2013, 02:03 PM   #5
ryuker16
LQ Newbie
 
Registered: Apr 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
Here's the right direction,
Warning: it's not a file permission issue.

How is a new EIP going to be a file change / permissions issue? Stop it.

More likely a my.cnf issue...
...around "bind-address = localhost" or the lack of such an entry, Is my guess.
See that "/var/run/mysqld/mysqld.pid ended" - THAT MEANS your mysql-server isn't running.
and My Guess is the bind-address property/element in my.cnf.
Thanks, I figured it.

Somehow my server just needed to be reset...I replaced the bind address from 0.0.0.0 to *...it worked....then back again.

Strange issue but I got it working.
 
Old 04-13-2013, 09:44 AM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Glad it worked out.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
change mysql username and password on ec2 lamp ggalan Linux - Newbie 4 04-04-2012 07:43 PM
Amazon EC2 & SES JB22 Linux - Newbie 1 03-16-2012 01:51 AM
SSH to Amazon EC2 Arlc Linux - Security 3 07-22-2011 07:41 PM
LXer: How To Create A LAMP Setup (Apache2, PHP, MySQL) On CentOS 5.x In An Amazon Linux AMI 32bits O LXer Syndicated Linux News 0 02-07-2011 09:11 AM
LXer: opentaps Launches open source ERP + CRM in the Cloud with Amazon EC2, MySQL LXer Syndicated Linux News 0 10-15-2010 07:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration