参考帖子:
首先,在 MySQL 官方网站上下载安装包, 如图:
然后,执行安装命令
bin/mysql_install_db --user=mysql --basedir=/home/devil/mysql57/ --datadir=/home/devil/mysql57/data/
报错:
2018-01-24 07:57:03 [ERROR] Can't locate the language directory.
发现其中有如此这个警告:
[WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
于是,更换安装方法:
bin/mysqld --initialize --user=mysql --basedir=/home/devil/mysql57/ --datadir=/home/devil/mysql57/data/