mysql 忘记密码怎么办?lunix系统安装
2018-01-05 11:13
645 查看
mysql -u root 错误提示:ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO) 登录root帐号需要密码,就是忘记密码的操作了。
mysql 5.7 [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonag
1.找到/etc/my.cnf 文件增加以下代码
2.重启mysql
3.设置
ok
1.在/etc/my.cnf文件中添加skip-grant-tables。
2.重启mysql,service mysqld restart
3.登录mysql,# mysql -u root
4.修改密码,
mysql>use mysql; mysql>update mysql.user set authentication_string=password('密码') where user='root'; mysql>flush privileges; mysql>exit;
5.恢复/etc/my.cnf,将skip-grant-tables删除或者注释掉。
6.重启mysql,service mysqld restart
okmysql 5.7 [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonag
1.找到/etc/my.cnf 文件增加以下代码
[mysqld] sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
2.重启mysql
service mysql restart
3.设置
mysql > SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
ok
相关文章推荐
- mac安装mysql初始密码忘记怎么办
- linux系统上mysql密码忘记了,怎么办?
- Window系统中MySql 5.7.19 忘记密码该怎么改回来
- VMware安装的Linux系统忘记密码 怎么修改root密码
- Mac安装mysql,忘记密码怎么办
- mac安装mysql初始密码忘记怎么办
- 用oneinstack安装的mysql忘记密码后怎么办?
- MySQL 忘记root密码 重新安装 干净卸载 清除原root密码方法 (Window系统)
- freebsd 系统上忘记mysql密码怎么办
- Mac安装mysql(忘记初始的默认密码怎么办?)
- MySQL 忘记root密码 重新安装 干净卸载 清除原root密码方法 (Window系统)
- Linux系统安装mysql之后如何更改密码(忘记密码)
- MySQL忘记root用户密码怎么办?
- mysql-5.7.16.zip免安装版教程及忘记密码root用户登录
- linux下使用yum安装mysql 和忘记密码的解决方案
- MySQL 忘记密码怎么办
- windows系统下mysql忘记密码的解决方案
- 登陆系统的两个界面以及忘记root密码怎么办
- 安装widows mysql 免安装版(zip) 步骤详解 以及遇到问题解决 以及忘记密码的修改方法
- mysql密码忘记怎么办