MySQL 5.7在Windows环境下忘记root用户密码 如何找回
1.停止MySQL服务 可以在“服务”中图形点击停止MySQL服务;也可以使用命令停止 net stop mysql 2.启动mysql服务,并加上参数–skip-grant-tables跳过授权表认证。 mysqld –skip-grant-tables 3.修改root密码 5.7 版本: update mysql.user set auth
Read more1.停止MySQL服务 可以在“服务”中图形点击停止MySQL服务;也可以使用命令停止 net stop mysql 2.启动mysql服务,并加上参数–skip-grant-tables跳过授权表认证。 mysqld –skip-grant-tables 3.修改root密码 5.7 版本: update mysql.user set auth
Read more公司的一套老Atlas执行delete时报如下错误
1 2 |
mysql> delete from sdb_jos_order_js t ; ERROR 1105 (07000): Proxy Warning - Syntax Forbidden |
猜测atlas对删除全表的操作做了限制。尝试加上limit限制删除的条数,依然报错
1 2 |
mysql> delete from sdb_jos_order_js t limit 1; ERROR 1105 (07000): Proxy Warning - Syntax Forbidden |
看来也可能是没有where条件造成的,添加伪where条件测试,删除成功。 [crayon-67a2e23f843120150462
Read more应审计需要,需将MySQL数据恢复到14天前。 公司MySQL采用xtrabackup方式备份。使用xtrabackup恢复MySQL后,无法启动MySQL,报错如下
1 |
Starting MySQL....The server quit without updating PID file[失败]a/mysql/data/SL010A-IVAMD1.pid). |
查看MySQL错误日志
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
2017-03-15 09:08:01 23485 [Note] InnoDB: Memory barrier is not used 2017-03-15 09:08:01 23485 [Note] InnoDB: Compressed tables use zlib 1.2.3 2017-03-15 09:08:01 23485 [Note] InnoDB: Using Linux native AIO 2017-03-15 09:08:01 23485 [Note] InnoDB: Using CPU crc32 instructions 2017-03-15 09:08:01 23485 [Note] InnoDB: Initializing buffer pool, size = 6.0G 2017-03-15 09:08:01 23485 [Note] InnoDB: Completed initialization of buffer pool 2017-03-15 09:08:01 23485 [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode 2017-03-15 09:08:01 23485 [ERROR] InnoDB: The system tablespace must be writable! 2017-03-15 09:08:01 23485 [ERROR] Plugin 'InnoDB' init function returned error. 2017-03-15 09:08:01 23485 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. ^G/data/mysql/bin/mysqld: File '/mysql/log/slow.log' not found (Errcode: 2 - No such file or directory) 2017-03-15 09:08:01 23485 [ERROR] Could not open /mysql/log/slow.log for logging (error 2). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown t he MySQL server and restart it. 2017-03-15 09:08:01 23485 [ERROR] Unknown/unsupported storage engine: InnoDB 2017-03-15 09:08:01 23485 [ERROR] Aborting |
解决办法: 由于执行xtrabackup使用root用户,恢复
Read more在操作系统上直接删除binlog日志(rm binlog)造成MySQL无法启动([ERROR] Failed to open log [ERROR] Could not open log file [ERROR] Can’t init tc log [ERROR] Aborting)。 问题描述: MySQL数据库所显示空间紧张,其中binlog日志占用了很多空间,脑袋一热就把所有b
Read more今天,开发人员反应MySQL测试库,查询ecs_ugo_goods表长时间不出结果,类似于卡死。在卡死之前,他在ecs_ugo_goods表里新增个字段 。 数据库版本5.6.24 。登录测试库,通过show processlist命令查看连接的状态,存在大量“Waiting for table metadata lock”锁等待。等待的线程都执行了和ecs_ugo_goods 表相关的SQL。
Read more