linux重新设置mysql密码方法
2015-09-17 11:13
681 查看
ubantu下忘记了mysql密码:
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> update user set password=password('newpassword') where user='root'; // newpassword代表新密码
mysql> flush privileges;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
enter password:
mysql>
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> update user set password=password('newpassword') where user='root'; // newpassword代表新密码
mysql> flush privileges;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
enter password:
mysql>
相关文章推荐
- linux环境下安装和卸载Mysql5.5
- CentOS6.5安装Xmanager远程桌面
- linux系统缓冲机制
- centos升级系统内核
- Linux 删除文件命令
- 90 mysql Linux mysql 数据库迁移到 windows
- Linux是如何管理内存的
- CentOS──xxx is not in the sudoers file解决方法
- CentOS──xxx is not in the sudoers file解决方法
- 建立自己的libevent工程
- centos下安装php环境
- linux中sed的用法
- Linux 有问必答:如何在 Linux 中统计一个进程的线程数
- linux下查看/var/log/wtmp文件的方法
- Linux达人养成计划I——常见目录作用
- linux 安装svn
- linux运维常用命令一句话(持续更新中)
- Redhat Linux 6 Ext3 File System Guide
- Linux学习7_*.src.rpm包与*.tar.gz、*.rpm包的区别
- Linux系统下Git的基本配置和使用示例