博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
mysql 5.7忘记密码及重新更改目录,无相关文件
阅读量:2399 次
发布时间:2019-05-10

本文共 1874 字,大约阅读时间需要 6 分钟。

mysql更改配置后,数据库存储目录更改,mysql出现

mysqld: Table 'mysql.plugin' doesn't exist

2018-06-14T08:14:22.143907Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

2018-06-14T08:14:22.149103Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2018-06-14T08:14:22.150239Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2018-06-14T08:14:22.150267Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2018-06-14T08:14:22.150363Z 0 [Note] IPv6 is available.
2018-06-14T08:14:22.150383Z 0 [Note]   - '::' resolves to '::';
2018-06-14T08:14:22.150431Z 0 [Note] Server socket created on IP: '::'.
2018-06-14T08:14:22.151913Z 0 [Warning] Insecure configuration for --pid-file: Location '/opt/website/mysql/var' in the path is accessible to all OS users. Consider choosing a different directory.
2018-06-14T08:14:22.152119Z 0 [Warning] Failed to open optimizer cost constant tables
2018-06-14T08:14:22.152321Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2018-06-14T08:14:22.152403Z 0 [ERROR] Aborting

[root@RCD var]#  ./mysql_install_db --basedir=/opt/website/mysql --datadir=/opt/website/mysql/var/ --user=mysql

[root@chen ~]# /etc/rc.d/init.d/mysql stop

[root@RCD bin]# ./mysqld_safe --skip-grant-tables &

[root@RCD bin]# mysql -p

mysql> update mysql.user set authentication_string=password('123') where user='root' and Host = 'localhost';

mysql> flush privileges;

mysql> quit

[root@RCD bin]# /etc/rc.d/init.d/mysql restart

[root@RCD bin]# mysql -uroot -p

mysql> show databases;

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> SET PASSWORD = PASSWORD('123');
Query OK, 0 rows affected, 1 warning (0.00 sec)

转载地址:http://zhdob.baihongyu.com/

你可能感兴趣的文章
MySQL关于数据字典的一个疑问
查看>>
今天的一点杂感
查看>>
从阴阳五行,四书五经到国学的理解
查看>>
如何理解Python web开发技术
查看>>
自动化平台中维度设计的一点思考
查看>>
运维开发的痛点和思考
查看>>
自动化分享里程碑小结20180127
查看>>
对这个公众号的分析和期望
查看>>
疯狂的十天计划开启(二) (改)
查看>>
自动化运维平台的流程草图
查看>>
任务调度并行算法的Java简单实现
查看>>
又一个轮回(r14笔记第100天)
查看>>
通过shell脚本检测MySQL服务信息
查看>>
Greenplum集群部署小记
查看>>
通过java画文本格式的统计图
查看>>
MySQL存储过程的权限问题
查看>>
大分区表的手工并行优化
查看>>
从“悲剧”的几个运维场景谈谈运维开发的痛点
查看>>
运维工作中几点深刻的经验和教训
查看>>
运维工作中的脚本化和工具化
查看>>