Recently while installing Percona MySQL 5.7.17 in an Amazon EC2 instance identified couple of Errors. The resolutions are quite simple and easy.
Will have a keen look into this by installing MySQL step by step:
1. Download Percona from the official website
$ wget https://www.percona.com/downloads/Percona-Server-LATEST/Percona-Server-5.7.17-12/binary/tarball/Percona-Server-5.7.17-12-Linux.x86_64.ssl101.tar.gz2. Untar/Unzip the Binaries
$ tar -zxvf Percona-Server-5.7.17-12-Linux.x86_64.ssl101.tar.gz
3. After successful unzip of software, tried to install the default mysql database using mysql_insall_db command,.
Note: From MySQL 5.7 mysql_install_db path has changed from scripts/mysql_install_db to bin/mysql_install_db
After running the below command:
Since the warning already saying that mysql_install_db command is already deprecated. I tried with below changes.
Conclusion:
While installing mysql_install_db initially, the command and options to the command got changed from MySQL 5.7 release. If you found similar bugs/errors, the above post is helpful.
Bugs related to above changes:
https://bugs.mysql.com/bug.php?id=74469
https://bugs.mysql.com/bug.php?id=75366
Note: From MySQL 5.7 mysql_install_db path has changed from scripts/mysql_install_db to bin/mysql_install_db
After running the below command:
$ bin/mysql_install_db --defaults-file=/etc/my.cnf --datadir=/data/mysql/data/Got the below error
[WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize [ERROR] Child process: /home/mysql/softwares/Percona-Server-5.7.17-12-Linux.x86_64.ssl101/bin/mysqldterminated prematurely with errno= 32 [ERROR] Failed to execute /home/mysql/softwares/Percona-Server-5.7.17-12-Linux.x86_64.ssl101/bin/mysqld --defaults-file=/etc/my.cnf --bootstrap --datadir=/data/mysql/data --lc-messages-dir=/usr/share/mysql --lc-messages=en_USIf you identify the above error carefully, the warning shows that the mysql_install_db option is deprecated and the new options to the command has appended --lc-messages-dir=/usr/share/mysql --lc-messages=en_US and --bootstrap
Since the warning already saying that mysql_install_db command is already deprecated. I tried with below changes.
$ bin/mysqld --no-defaults --datadir=/data/mysql/data/ --basedir=/home/mysql/softwares/Percona-Server-5.7.17-12-Linux.x86_64.ssl101 --lc-messages-dir=/data/mysql/share/ --initializeThis time I was succeeded, and started the db with mysqld_safe command.
$ bin/mysqld_safe --defaults-file=/etc/my.cnf --basedir=/home/mysql/softwares/Percona-Server-5.7.17-12-Linux.x86_64.ssl101 &
Conclusion:
While installing mysql_install_db initially, the command and options to the command got changed from MySQL 5.7 release. If you found similar bugs/errors, the above post is helpful.
Bugs related to above changes:
https://bugs.mysql.com/bug.php?id=74469
https://bugs.mysql.com/bug.php?id=75366
Comments
Post a Comment