正如标题所示,我正试图在Ansible上安装Debian上的MySQL Server 5.5。
由于这需要进行无提示安装,所以在使用debconf模块安装之前,我提供了root密码。 这是这个输出:
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'})
我写了一个安装Tripwire的angular色,就像一个魅力一样。 但不幸的是,MySQL安装失败,出现以下消息:
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)
任何想法如何解决这个问题?
提前致谢!
注意:如果你是downvoting,至less告诉我为什么!
这是你的问题:
InnoDB: mmap(137363456 bytes) failed; errno 12
那个errno意味着当MySQL试图启动时你内存不足了。 要么减lessMySQL使用的内存量,要么给机器更多的RAM。