首页 > 数据库技术 > 详细

mysql安装

时间:2016-11-13 02:35:30      阅读:193      评论:0      收藏:0      [点我收藏+]

Mysql:步骤

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 ‘mysql.host‘ doesn‘t exist

4、执行mysql_install_db

5、重启就可以了


man 一下 mysql_install_db

DESCRIPTION

       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

       example:


           shell> bin/mysql_install_db --user=mysql \

                    --basedir=/opt/mysql/mysql \

                    --datadir=/opt/mysql/mysql/data


本文出自 “Linux” 博客,请务必保留此出处http://ridingonhorse.blog.51cto.com/11265295/1872192

mysql安装

原文:http://ridingonhorse.blog.51cto.com/11265295/1872192

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!