新下载了mysql,口令为空,如何修改root口令:
首先登陆mysql
use mysql;
update
user
set
password
=
password
(
'new_password'
)
where
user
=
'root'
;
flush
privileges
;
注意需要
flush
privileges
;