LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   MYSQL on Lamp inoperable after IP switch on amazon EC2 (http://www.linuxquestions.org/questions/linux-server-73/mysql-on-lamp-inoperable-after-ip-switch-on-amazon-ec2-4175457843/)

ryuker16 04-11-2013 08:22 PM

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

chrism01 04-11-2013 09:35 PM

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/

ryuker16 04-11-2013 10:27 PM

Quote:

Originally Posted by chrism01 (Post 4930090)
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.

Habitual 04-12-2013 01:10 PM

Quote:

Originally Posted by ryuker16 (Post 4930107)
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.

ryuker16 04-12-2013 02:03 PM

Quote:

Originally Posted by Habitual (Post 4930462)
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.

Habitual 04-13-2013 09:44 AM

Glad it worked out.


All times are GMT -5. The time now is 11:36 PM.