mysql
Granger_g
不积跬步无以至千里
展开
-
MySQL8.0.忘记密码解决报 ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
前言最近好像遇到了黑客,数据库总是被删,然后我在数据库上加了权限,禁止使用drop命令,结果把自己也限制住了,自己新建了一个表,却删除不了。下面这个方法可以跨过用户权限使用drop命令,同时也能解决密码忘记的问题。注意:我使用的数据库是MySQL8.0第一步:关闭服务 net stop mysql 这个需要在管理员权限才行 ,具体怎么用管理员打开cmd略过第二步:进入到安装的bin目录 执行 :mysqld --console --skip-grant-tables --shared-.原创 2022-02-15 08:54:44 · 620 阅读 · 0 评论 -
java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corres
错误描述java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order = 0 WHERE habit_id = '20001926'' at line 1我在执行一段 sql时出现了上面的错误sql语句为:.原创 2021-03-25 22:47:10 · 2819 阅读 · 0 评论 -
java.sql.SQLException: Field ‘habit_id‘ doesn‘t have a default value
bug 记录,今天执行下面这段代码时报:java.sql.SQLException: Field 'habit_id' doesn't have a default value异常String sql = "INSERT INTO user_habit_info(user_id,user_habit,habit_create_time) values('%s','%s','%s')";//要执行的SQL语句statement.executeUpdate(String.format(sql,user_原创 2020-10-14 15:15:57 · 142 阅读 · 0 评论