标签:sel ant use /etc/ SQ min -- select tar
/usr/local/mysql/bin/mysql -uroot
ps aux | grep mysql
/etc/init.d/mysqld start
!ps
ls /usr/local/mysql/bin/mysql
echo $PATH
export
mysqladmin
/ect/profile 修改此目录,添加一行即可
更改mysql密码
mysqladmin -uroot -p ‘aminglinux.1‘ password ‘aminglinux.2‘
mysql -p ‘amingliux‘
update user set password=password(‘aminglinux‘) where user=‘root‘
mysql -uroot -p123456
进入 my.cnf 文件中,vim,添加一行 skip-grank
vim /etc/my.cnf
/etc/init.d/mysqld restart
再修改一份表
切换库,use mysql:
select password from user;
update user set password=password(‘aminglinux‘) where user=‘root‘;
退出,然后返回 vim /etc/my.cnf 去掉刚刚价的一行--skip-grant;可以直接注释掉
/etc/init.d/mysqld restart
总结-------设置更改root密码:
1.vi /etc/my.cnf----添加一行”skip-grant“
2.mysql -uroot;
use mysql;
updateuser set password=password(‘aminglinux‘) where user=‘root‘
3.vi .etc/my.cnf-------delete skip-grant
4.restart
mysql--设置更改根密码
标签:sel ant use /etc/ SQ min -- select tar
原文地址:https://www.cnblogs.com/FlameLuo/p/9017627.html