If the MySQL Server fails to start during deploy then you should check the error log, if you can't interpret it, let us know. Here is an example:
192.168.56.4: Executing 'chown -R mysql:mysql /var/lib/mysql' [ok]
192.168.56.4: Executing 'chown -R mysql:mysql /var/lib/mysql' [ok]
192.168.56.4: Checking if '/var/lib/mysql/test' exists [ok]
192.168.56.4: Checking if '/var/lib/mysql/mysql' exists [ok]
192.168.56.4: Executing '/etc/init.d/mysql start' [failed]
Now, let's check the error log of the failed mysql server, it will give hints.
In this case it is because more memory specified in the Configurator than the server actually had, so the mysql server failed to allocate the innodb_buffer_pool :
[root@localhost install]# cat /var/lib/mysql/error.log
120212 22:54:13 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
120212 22:54:13 [Note] Plugin 'FEDERATED' is disabled.
120212 22:54:13 InnoDB: The InnoDB memory heap is disabled
120212 22:54:13 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120212 22:54:13 InnoDB: Compressed tables use zlib 1.2.3
120212 22:54:13 InnoDB: Using Linux native AIO
120212 22:54:13 InnoDB: Initializing buffer pool, size = 2.8G
InnoDB: mmap(3076734976 bytes) failed; errno 12
120212 22:54:13 InnoDB: Completed initialization of buffer pool
120212 22:54:13 InnoDB: Fatal error: cannot allocate memory for the buffer pool
120212 22:54:13 [ERROR] Plugin 'InnoDB' init function returned error.
120212 22:54:13 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120212 22:54:13 [ERROR] Unknown/unsupported storage engine: InnoDB
120212 22:54:13 [ERROR] Aborting
120212 22:54:13 [Note] /usr/sbin/mysqld: Shutdown complete
The remedy for this is to lower the innodb_buffer_pool.
You can make changes in the configuration files (my.cnf.cmon and my.cnf) and the files are located in (MySQL Replication, Galera):
<deployment-package>/mysql/config
and in the case of MySQL Cluster:
<deployment-package>/cluster/config
When you have made your changes, run deploy.sh again (you should never run deploy on an already running database cluster).
Comments
2 comments
Thanks, This works.
Hello Johan
I also faced the same issue. When I apply this solution that is work. You are awesome for sharing your experiences. https://support.severalnines.com/hc/en-us/articles/212426803-mysql-server-fails-to-start-during-deploypython I hope I will connect with you to get more information. You make my day with this solution. Keep growing
Please sign in to leave a comment.