快速实现MySQL的部署以及一机多实例部署

2019-01-04 13:57:20王旭

总结:

在初始化的过程中,如果报以下错误:

FATAL ERROR: Neither host 'keepalived02' nor 'localhost' could be looked up with /mysql3306/mysql/bin/resolveip Please configure the 'hostname' command to return a correct hostname. If you want to solve this at a later stage, restart this script with the --force option

但是在bash终端上执行hostname命令又确实有值返回,可加--force参数,如下所示:

scripts/mysql_install_db --user=mysql --defaults-file="$user_cnf" --force

如果报以下错误:

[ERROR] Can't find messagefile '/mysql3306/mysql/share/errmsg.sys'

可将二进制版本中share/english/errmsg.sys文件COPY到/mysql3306/mysql/share/下。

后续:这两个错误的原因都是因为basedir修改了,它默认是在二进制包中查找的。

如何利用脚本实现MySQL的快速部署以及一机多实例的部署,通过这篇文章希望对大家学习MySQL的部署有所帮助。

您可能感兴趣的文章:

mysql使用mysqld_multi部署单机多实例的方法教程CentOS6.5 上部署 MySQL5.7.17 二进制安装以及多实例配置shell使用mysqld_multi自动做多实例从库脚本基于mysql多实例安装的深入解析Linux下安装Mysql多实例作为数据备份服务器实现多主到一从多实例的备份MySQL多实例配置方案