|
5.7版本下的mysql数据库下已经没有password这个字段了,password字段改成了authentication_string
vi /etc/my.cnf # mysql数据库重要核心配置文件
1.vim /etc/my.cnf 进行编辑,加入skip-grant-tables
2、systemctl restart mysqld 重启Mysql
3.mysql 登录 无需密码
------------------------------------------------
update mysql.user set authentication_string=password('NB/nb123321') where user='root';#5.7的方法
flush privileges;
--------------------------------------
Linux查看mysql是否启动的命令
service mysqld status
mysql数据库停止,重启,启动的命令:
service mysqld stop
service mysqld restart
service mysqld start