mysql 启动错误

错误提示如下:

150815 20:24:40 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
150815 20:26:07 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
150815 20:26:07 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

 

解决方法:

mysql_install_db --user=mysql  #进行数据库的初始化

 

以下是此命令的用法:

 1 mysql_install_db说明
 2 当MySQL的系统库(mysql系统库)发生故障或需要新加一个mysql实例时,需要初始化mysql数据库。
 3 需要使用的命令:/usr/local/mysql/bin/mysql_install_db
 4 #/usr/local/mysql/bin/mysql_install_db --help 可以查看帮助信息如下
 5 Usage: /usr/local/mysql/bin/mysql_install_db [OPTIONS]
 6   --basedir=path       The path to the MySQL installation directory.
 7   --cross-bootstrap    For internal use.  Used when building the MySQL system
 8                        tables on a different host than the target.
 9   --datadir=path       The path to the MySQL data directory.
10   --force              Causes mysql_install_db to run even if DNS does not
11                        work.  In that case, grant table entries that normally
12                        use hostnames will use IP addresses.
13   --ldata=path         The path to the MySQL data directory.
14   --rpm                For internal use.  This option is used by RPM files
15                        during the MySQL installation process.
16   --skip-name-resolve  Use IP addresses rather than hostnames when creating
17                        grant table entries.  This option can be useful if
18                        your DNS does not work.
19   --srcdir=path        For internal use.  The directory under which
20                        mysql_install_db looks for support files such as the
21                        error message file and the file for popoulating the
22                        help tables.
23   --user=user_name     The login username to use for running mysqld.  Files
24                        and directories created by mysqld will be owned by this
25                        user.  You must be root to use this option.  By default
26                        mysqld runs using your current login name and files and
27                        directories that it creates will be owned by you.

 

转载于:https://www.cnblogs.com/wspblog/p/4733128.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值