重置mysql密码
2016-05-18 17:29
381 查看
重置mysql密码:mysqladmin -uroot password '123' 增加用户在配置文件增加:vim /etc/my.cnfskip-grant重启mysql:/etc/init.d/mysqld restartuse mysql
update user set password=password('新密码') where user='root'select * from user where user='root'\G;
创建用户和密码
mysql -uroot -e "grant all on *.* to 'zabbix'@'localhost' identified by 'zabbix'";
update user set password=password('新密码') where user='root'select * from user where user='root'\G;
创建用户和密码
mysql -uroot -e "grant all on *.* to 'zabbix'@'localhost' identified by 'zabbix'";
相关文章推荐
- MySQL中的integer 数据类型
- MySQL存储过程
- mysql中int、bigint、smallint 和 tinyint的区别与长度
- mysql load data 导出、导入 csv
- source命令执行SQL脚本文件
- MySQL创建用户及权限控制
- MySQL管理数据表
- linux下mysql添加用户
- mysql procedure
- mysql触发器
- MySQL 备份和恢复策略
- mac下安装mysql(转载)
- mysql 修改编码 Linux/Mac/Unix/通用(杜绝修改后无法启动的情况!)
- MySQL数据的导出、导入(mysql内部命令:mysqldump、mysql)
- mysql数据行转列
- Linux下修改MySQL编码的方法
- MySQL Server 日志
- MySQL 安全事宜
- MySQL 备份与恢复