1、~]# yum -y install mysql-server

2、[root@mysql_httpd ~]# tail -20 /var/log/mysqld.log

3、161112 17:21:19 [ERROR] Fatal error: Can't open and lock privilege tables: Table '' doesn't exist



man 一下 mysql_install_db


       mysql_install_db initializes the MySQL data directory and creates the system tables that it contains, if they do not exist.

       mysql_install_db is a shell script and is available only on Unix platforms.


 Because the MySQL server, mysqld, needs to access the data directory when it runs later, you should either run

       mysql_install_db from the same system account that will be used for running mysqld or run it as root and use the --user option

       to indicate the user name that mysqld will run as. It might be necessary to specify other options such as --basedir or

       --datadir if mysql_install_db does not use the correct locations for the installation directory or data directory. For


           shell> bin/mysql_install_db --user=mysql \

                    --basedir=/opt/mysql/mysql \