0

As the title suggests, I am trying to install MySQL Server 5.5 on Debian with Ansible.

Since this needs to be a silent installation, I provide the root password before the installation with debconf module. Here's the output for this:

changed: [nqdo-net] => (item={'value': {'type': 'password', 'name': 'mysql-server/root_password', 'value': u'XXXXthisismyrandomandlongpasswordXXXX'}, 'key': 'root_password'})
changed: [nqdo-net] => (item={'value': {'type': 'password', 'name': 'mysql-server/root_password_again', 'value': u'XXXXthisismyrandomandlongpasswordXXXX'}, 'key': 'root_password_again'})

I wrote a role to install Tripwire like this and it works like a charm. But unfortunately, MySQL installation fails with this message:

140901 21:24:55 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
140901 21:24:55 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
140901 21:24:55 [Note] Plugin 'FEDERATED' is disabled.
140901 21:24:55 InnoDB: The InnoDB memory heap is disabled
140901 21:24:55 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140901 21:24:55 InnoDB: Compressed tables use zlib 1.2.7
140901 21:24:55 InnoDB: Using Linux native AIO
140901 21:24:55 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
140901 21:24:55 InnoDB: Completed initialization of buffer pool
140901 21:24:55 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140901 21:24:55 [ERROR] Plugin 'InnoDB' init function returned error.
140901 21:24:55 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

140901 21:24:55 [ERROR] Unknown/unsupported storage engine: InnoDB
140901 21:24:55 [ERROR] Aborting

140901 21:24:55 [Note] /usr/sbin/mysqld: Shutdown complete

Configuring mysql-server-5.5
----------------------------

Unable to set password for the MySQL "root" user

An error occurred while setting the password for the MySQL administrative user. This may have happened because the account already has a password, or because of a communication problem with the MySQL server.

You should check the account's password after the package installation.

Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more
information.

insserv: warning: script 'K01confluence' missing LSB tags and overrides
insserv: warning: script 'confluence' missing LSB tags and overrides
[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed
!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1

msg: 'apt-get install 'mysql-server-5.5' ' failed: E: Sub-process /usr/bin/dpkg
returned an error code (1)

Any idea on how to solve this?

Thanks in advance!

Note: If you are downvoting, at least tell me why!

Deniz Acay
  • 111
  • 4
  • this can help you http://dba.stackexchange.com/questions/25165/intermittent-mysql-crashes-with-error-fatal-error-cannot-allocate-memory-for-t – c4f4t0r Sep 01 '14 at 20:23
  • @c4f4t0r I ran into similar posts around the net, but most of them addresses a MySQL configuration problem; but in my situation, installation itself fails. I don't think the problem is about memory, preconfiguring with debconf-set-selections via shell works. – Deniz Acay Sep 01 '14 at 20:27

1 Answers1

1

Here is your problem:

InnoDB: mmap(137363456 bytes) failed; errno 12

That errno means you ran out of memory when MySQL attempted to start up. Either reduce the amount of memory MySQL uses, or give the machine more RAM.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940