初始化数据库默认命令:./scripts/mysql_install_db --user=mysql --datadir=/data/mysql


  1. 报错信息:

    -bash: ./scripts/mysql_install_db: /usr/bin/perl: 坏的解释器: 没有那个文件或目录、


  •    解决方法:

     yum install perl gcc kernel-devel

 2. 报错信息:

[root@localhost mysql]# ./scripts/mysql_install_db --user=mysql --datadir=/data/mysql

FATAL ERROR: please install the following Perl modules before executing ./scripts/mysql_install_db:

Data::Dumper

  • 解决方法:

    yum  install -y autoconf

 3. 报错信息:

  [root@localhost mysql]# ./scripts/mysql_install_db --user=mysql --datadir=/data/mysql

Installing MySQL system tables..../bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

  • 解决方法:

    yum  install -y libaio-devel