remove all mysql
$ sudo apt-get autoremove –purge mysql*
$ sudo rm -rf /var/lib/mysql/
$ sudo rm -rf /etc/mysql/
install mysql
$ sudo apt-get update
$ sudo apt-get build-dep mysql-server-5.6
$ sudo apt-get install mysql-server-5.6
Normally Error:
start: Job failed to start
invoke-rc.d: initscript mysql, action “start” failed.
dpkg: error processing package mysql-server-5.6 (–configure):
subprocess installed post-installation script returned error exit status 1
Setting up libhtml-template-perl (2.95-1) …
Setting up mysql-common-5.6 (5.6.16-1~exp1) …
Processing triggers for libc-bin (2.19-0ubuntu6) …
Processing triggers for ureadahead (0.100.0-16) …
Errors were encountered while processing:
mysql-server-5.6
E: Sub-process /usr/bin/dpkg returned an error code (1)
Solutions:
The problem you are having looks the same as this bug report. The failure to start seems to be because the default MySQL 5.6 configuration requires more memory than it can get in your micro instance.
The solution to the error appears to be to do one of the following:
Increase the amount of memory in your EC2 instance
Set a smaller value for MySQL’s max_connections variable