# Cannot install MySQL Server 5.5



## D. Strout (Jun 17, 2013)

I just reinstalled a VPS of mine (RamNode) and am trying to set up a LAMP stack. The server is running Ubuntu 12.10, so I ran


apt-get install apache2 php5 php5-curl php5-mcrypt php5-mysql mysql-client mysql-server
It retrieved the packages, then in "preconfiguring packages" the installer asked me for a new MySQL root PW. The first time I tried, the password had non-alphanumeric characters. I entered it and pressed enter for OK. The packages unpacked fine, then when it got to "setting up" the various packages, the process stopped, saying it could not set the new password, and I'd have to set the password after install. I figured it must be the different characters. Fine, I pressed enter for OK again. However, the install was frozen. It wouldn't proceed past this:


Setting up mysql-server-5.5 (5.5.31-0ubuntu0.12.10.1) ...
Ugh. I closed the SSH session and reinstalled the server again. I tried installing the LAMP stack again (same command), then when asked for a password entered an alphanumeric password. The exact same issue happened. When trying to set up the server, it could not set the password and froze after trying. Now what?


----------



## vanarp (Jun 17, 2013)

Can you try to use Minstall or TuxLite and see if that goes through?


----------



## wlanboy (Jun 17, 2013)

That is a bug in the MySQL setup skript. You have to use a empty password during installation because it is not stored correctly.

You can change the password afterwards:


```
shell> mysql -u root

mysql> UPDATE mysql.user SET Password = PASSWORD('[your secure password]') WHERE User = 'root';

mysql> FLUSH PRIVILEGES;

mysql> exit
```


----------



## drjaking (Jun 19, 2013)

wlanboy said:


> That is a bug in the MySQL setup skript. You have to use a empty password during installation because it is not stored correctly.
> 
> You can change the password afterwards:


I have the same problem (ubuntu 12.10) but even if I leave blank it still hangs at:

Setting up mysql-server-5.5 (5.5.31-0ubuntu0.12.10.1) ...

Any more ideas?


----------



## wlanboy (Jun 19, 2013)

Let's try a purge and reinstall:


```
apt-get autoremove --purge mysql-server-5.5
apt-get autoremove --purge mysql-client-5.5
rm -rf /var/lib/mysql ~/.mysql /etc/mysql
apt-get purge mysql*
apt-get install mysql-server-5.5 mysql-client-5.5
```


----------



## drjaking (Jun 20, 2013)

I tried the full purge, exactly the same problem. Putty log here. I've left the escape codes in, but what happens is I get several pink screens asking for a password, I hit enter at each and if freezes at

Setting up mysql-server-5.5 (5.5.31-0ubuntu0.12.10.1) ...

http://pastebin.com/5jtXCfdm

The last few minutes of /var/log/mysql/error.log:

http://pastebin.com/idhqVMBx


----------



## vanarp (Jun 20, 2013)

How about changing the engine to MyISAM in my.cnf? It could be that InnoDB having problems due to low memory or whatever?


[mysqld]
.
.
skip-innodb
default-storage-engine=MyISAM
.
.
.


----------



## peterw (Jun 20, 2013)

vanarp said:


> How about changing the engine to MyISAM in my.cnf? It could be that InnoDB having problems due to low memory or whatever?
> 
> 
> [mysqld]
> ...


And disabling native AIO in my.cnf


innodb_use_native_aio=0

Because of this:


```
130620 11:28:30 InnoDB: Fatal error: cannot initialize AIO sub-system
130620 11:28:30 [ERROR] Plugin 'InnoDB' init function returned error.
130620 11:28:30 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
```


----------



## vanarp (Jun 21, 2013)

*@D. Strout*, *@drjaking*  - Any update on how you got this problem resolved?


----------



## George_Fusioned (Jun 21, 2013)

What is the output of

cat /proc/sys/fs/aio-max-nr?
Is this on an OpenVZ VPS?


----------



## walesmd (Jun 21, 2013)

Regardless, why would you run MySQL instead of Maria DB? The install script is trying to do you a favor.


----------

