关于The MySQL server is running with the--skip-grant-tables option so it cannot execute thisstatement
来源:互联网 发布:ps3模拟器优化设置 编辑:程序博客网 时间:2024/05/21 19:37
事情是上周五发生的,花了3天才完完整整解决,今天把它记录下来,希望对在mysql上有困扰的朋友有帮助。
楼主遇到的主要问题
1、ERROR 1290 (HY000): The MySQL server is running with the--skip-grant-tables option so it cannot execute thisstatement
2、Access denied for user 'root'@'localhost' (using password: YES)
楼主遇到这些问题的伏笔
1、同学帮我装了一次mysql,我自己很久很久之前又装了一个,没有在意这些细节。
2、之前解决mysql的问题的时候竟然用了skip-grant-tables,很明显是一百度到了解决方法也没管是什么方法就用上了,实际上根本不可能用这种没安全性的方法。
楼主之前写javaweb小项目的时候用到Mysql的东西都比较基础——DaoImp层写点增删改查。最近自己写的一个小东西会需要点新东西,和“签到”功能很类似,即每次会减一,每天只能有一个具体的次数,并且在每天12点整的时候要更新数据库所有用户的该属性。百度了一下,发现这个可以用mysql的事件来解决。
于是我按照百度上的开启事件的方法,set XXX on() 然后出现了错误1 .百度上有很多一样的,我试了几个都没什么用,当时又反复看这句英语,应该是说 mysql运行在了跳过什么什么的指令上,于是想起以前的my.ini,打开后发现了最后一行不知道我什么时候加的 skip-grant-tables ,当时就傻逼了,如果都跳过了密码还有什么意义,我试了下改成一个错误的密码,果然也能进mysql。于是我去掉这句话以为大功告成了,点开navicat,出现错误2,我又傻逼了。百度错误2,有一种解决方法我觉得不合理,就是让你直接用update user set password = xxx 改密码,因为mysql里的密码好像是加了密的,(我后来解决问题后设置密码123456 但是在dos下select 密码 都是一段很长的字符串,直接改了应该不妥。)
经过一番调整,基本没用,只好采取万事终极解决方案——重装。这里一定提醒重装的朋友,
A 完全卸载所有mysql
B 我的电脑里搜索mysql,删除相关文件
C注册表搜索 删除相关信息
D安装的时候最好关了杀毒软件以防万一
等我重装了之后发现mysql直接不认识事件了,原来是版本太低了,哎,赶紧去mysql官网下载一个最新版,对比着百度上的安装教程和自己的理解,最后安装成功,并且成功开启了事件。
总结:
1、调bug的时候尽量专注,我耽误了3天就是因为前两天调的时候边干其他事耽误了。
2、解决问题的时候如果忽然就莫名其妙的好了,尽量知其所以然,不然它依旧是一个隐患,总有一天会爆发。
3、万事万能解决法重装,如果一个问题困扰太久大于了你所能承受的解决时间就直接重装。重装一定要清理干净。
- 关于The MySQL server is running with the--skip-grant-tables option so it cannot execute thisstatement
- MySQL报错:The MySQL server is running with the --skip-grant-tables option so it cannot execute this st
- MySQL报错:The MySQL server is running with the --skip-grant-tables option so it cannot execute this st
- mysql错误:`The MySQL server is running with the --skip-grant-tables option so it cannot execute this s
- The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
- The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
- ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot exe
- ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot exe
- ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot exe
- ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot exe
- ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot exe
- ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot exe
- 问题:The MySQL server is running with the --skip-grant-tables option
- The MySQL server is running with the --read-only option so it cannot execute this statement
- MYSQL导出数据出现The MySQL server is running with the --secure-file-priv option so it cannot execute this
- 1209 - The MySQL server is running with the --read-only option so it cannot execute this statement
- The MySQL server is running with the --secure-file-priv option so it cannot execute this statement解决
- The MySQL server is running with the --secure-file-priv option so it cannot execute this statement解决
- 字节对齐方式
- 会话跟踪技术
- java semaphore
- 递归 求组合
- Java编程思想小笔记3(第11章)
- 关于The MySQL server is running with the--skip-grant-tables option so it cannot execute thisstatement
- SuperMap iClient 7C for Flash之热点图的时间轴控制
- java native方法使用及JNI实例
- 论坛中的问题:48(Microsoft.ACE.OLEDB.15.0 文件共享锁定数溢出 报错的解决方法)
- CoreData
- AutoLayout 入门
- gcc及其选项详解
- 获取指定目录下的所有文件名
- Java的内存回收机制