EC2 AMI Linux m1.small instance...
Had created a swap file a few hours BEFORE experiencing MySQL ERROR 2002 ERROR...
[user]$ sudo dd if=/dev/zero of=/swapfile bs=1M count=1024
[user]$ sudo service mysqld start
[user]$ sudo swapon /swapfile
[user]$ mkswap /swapfile
Added the following line to /etc/fstab
/swapfile swap swap defaults 0 0
Verified the website was working (which it was), returned 4 hours later and have a 403 screen (You don't have permission to access / on this server)
First thing I did was check the status of the server...
[user] $ sudo service mysqld status
mysqld dead but subsys locked
Removed the lock file...
[user]$ cd /var/lock/subsys
[user]$ sudo rm mysqld
[user]$ sudo service mysqld start
Starting mysqld: [ FAILED ]
Opened the MySQL log file...
Version: '5.5.37' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
140523 22:26:38 mysqld_safe Number of processes running now: 0
140523 22:26:38 mysqld_safe mysqld restarted
140523 22:26:39 [Note] Plugin 'FEDERATED' is disabled.
140523 22:26:39 InnoDB: The InnoDB memory heap is disabled
140523 22:26:39 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140523 22:26:39 InnoDB: Compressed tables use zlib 1.2.7
140523 22:26:39 InnoDB: Using Linux native AIO
140523 22:26:39 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
140523 22:26:39 InnoDB: Completed initialization of buffer pool
140523 22:26:39 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140523 22:26:39 [ERROR] Plugin 'InnoDB' init function returned error.
140523 22:26:39 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140523 22:26:39 [ERROR] Unknown/unsupported storage engine: InnoDB
140523 22:26:39 [ERROR] Aborting
140523 22:26:39 [Note] /usr/libexec/mysqld: Shutdown complete
140523 22:26:39 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
The mysqld.pid file in /var/run/mysqld/ is not to be found
Verified that the my.cnf has socket=/var/lib/mysql/mysql.sock
Tried uninstalling and reinstalling MySQL-server and not changes...
Tried creating a mysql.sock with 600 permissions, it was removed as soon as an attempt to start mysql was made (later discovered this file only exists when mysql is running)
Rebooted the instance - twice - followed by shutting down Apache, trying to restart MySQL (failed), restarting Apache...
TOTAL loss at what to do next -- the site is already but but not launched... I do have a snapshot of the volume that could help save time but not familiar with how to replace the current volume with a snapshot.
Open to suggestions...
Previously used sources:
http://stackoverflow.com/questions/1...43121#23843121
http://www.serveridol.com/2013/07/31...ission-denied/