linux系统下mysql跳过密码验证登录
来源:互联网 发布:手机联系人恢复软件 编辑:程序博客网 时间:2024/06/05 15:38
修改MySQL的登录设置:
# vi /etc/my.cnf
在[mysqld]的段中加上一句:skip-grant-tables
例如:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-name-resolve
skip-grant-tables
保存并且退出vi。
3.重新启动mysqld
# /etc/init.d/mysqld restart
Stopping MySQL: [ OK ]
Starting MySQL: [ OK ]
4.登录并修改MySQL的root密码
# /usr/bin/mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 3.23.56
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql> USE mysql ;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
mysql> UPDATE user SET Password = password ( ‘new-password’ ) WHERE User = ‘root’ ;
Query OK, 0 rows affected (0.00 sec) Rows matched: 2 Changed: 0 Warnings: 0
mysql> flush privileges ;
Query OK, 0 rows affected (0.01 sec)
mysql> quit
Bye
5.将MySQL的登录设置修改回来
# vi /etc/my.cnf
将刚才在[mysqld]的段中加上的skip-grant-tables删除
保存并且退出vi。
6.重新启动mysqld
# /etc/init.d/mysqld restart
Stopping MySQL: [ OK ]
Starting MySQL: [ OK ]
阅读全文
0 0
- linux系统下mysql跳过密码验证登录
- linux系统下mysql跳过密码验证登录
- linux系统下mysql跳过密码验证登录
- MySQL跳过密码登录
- mysql跳过密码登录
- MySQL跳过密码登录
- Linux下mysql第一次登陆跳过密码
- windows下忘记mysql密码,跳过登录进入mysql解决方案
- mysql跳过密码验证修改密码
- linux安装的数据库,跳过登录密码
- Maximo跳过密码验证
- Linux系统下忘记MySql密码怎么办?
- win&Linux系统下重置MySQL密码
- 跳过Mysql验证
- LInux下密码验证
- skip_before_filter登录跳过验证必备
- GIT 配置SSH跳过密码 WIN系统下
- Linux系统下如何做到SSH免密码登录
- 服务器CentOS 6.8安装jdk、tomcat、mysql
- 沉浸透明状态栏
- Mysql 分表
- 编程工具使用教程汇总(持续更新)
- 企业级rsync同步:sersync多目录实时步操作记录
- linux系统下mysql跳过密码验证登录
- hadoop伪分布式集群(单节点与多节点)配置
- [YTU]_2384 ( 矩形类中运算符重载【C++】)
- 冒泡排序--Java版
- Python 文件判断 用户输入 文件名和路径 判断是否存在
- JSP数据交互
- 通过扫描就能获得信息Vin码识别技术
- smb文件共享
- 矢量资源工具Vector Asset Studio