Why did installation of MySQL 5.6 on Ubuntu 14.04 fail?

I have encounter the same problem when I init my small VPS. The issue is caused by small memory. So without spending extra money to increase the memory which you not needed, you could simply create swap files to aids the installation. Yes the swap is slow, but all you need is get the install done.

On Ubuntu 14.04, I do the following to solve the problem:

Create a 4G swap file:

sudo fallocate -l 4G /swapfile

Change its permission to only root could access and change:

sudo chmod 600 /swapfile

Make it swap:

sudo mkswap /swapfile

Activate:

sudo swapon /swapfile

Now you can try install mysql again, it should success this time. Just remember to remove the previous unsuccessful installation before you do so.


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

I have encounter the same problem. Though i had the big enough memory 12Gb given to my VM, but still things were failing as in question. After spending some time found that default apt get was missing some of the configuration translation and tool translation packages.

The MySQL apt repository provides a simple and convenient way to install and update MySQL products with the latest software packages using apt-get. Here is what you have to follow:

  1. Adding the MySQL APT Repository First, add the MySQL apt repository to your system's software repository list. Follow these steps:

    • Go to the download page for the MySQL apt repository at http://dev.mysql.com/downloads/repo/apt/.

    • Select and download the release package.

    • Install the downloaded release package with the following command, replacing version-specific-package-name with the name of the downloaded package (preceded by its path, if you are not running the command inside the folder where the package is):

      sudo dpkg -i /PATH/version-specific-package-name.deb
      

    Note that the same package works on all supported Debian and Ubuntu platforms.

    • During the installation of the package, you will be asked to choose the versions of the MySQL server and other components (for example, the MySQL Workbench) that you want to install. If you are not sure which version to choose, do not change the default options selected for you. You can also choose none if you do not want a particular component to be installed. After making the choices for all components, choose OK to finish the configuration and installation of the release package.

    you can always change your choices for the versions later;
    see Selecting a Major Release Version for instructions.

    • Update package information from the MySQL APT repository with the following command (this step is mandatory):

      sudo apt-get update
      
  2. Installing MySQL with APT

    • Install MySQL by the following command:

      sudo apt-get install mysql-server
      

This installs the package for the MySQL server, as well as the packages for the client and for the database common files.

During the installation, there are two requests by the dialogue boxes: Supply a password for the root user for your MySQL installation.

  1. Starting and Stopping the MySQL Server

The MySQL server is started automatically after installation. - You can check the status of the MySQL server with the following command:

sudo service mysql status
  • Stop the MySQL server with the following command:

    sudo service mysql stop
    
  • To restart the MySQL server, use the following command:

    sudo service mysql start
    

I followed this http://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#apt-repo-fresh-install. This worked smoothly and downloaded all packages and successfully installed mysql 5.6.