# for newer mysql or mariadb version
ALTER USER 'root'@'localhost' IDENTIFIED BY 'ZeKQxTW57VgDP0VN';
ALTER USER 'root'@'%' IDENTIFIED BY 'ZeKQxTW57VgDP0VN';

# for older mysql or mariadb version
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('ZeKQxTW57VgDP0VN');
SET PASSWORD FOR 'root'@'%' = PASSWORD('ZeKQxTW57VgDP0VN');

# local root login test
mysql -u root -pZeKQxTW57VgDP0VN

# make root can access from remote
grant all privileges on *.* to root@'%' identified by 'ZeKQxTW57VgDP0VN';

# remote test
mysql -h xx -u root -pZeKQxTW57VgDP0VN
Copyright © opschina.org 2017 with zzlyzq@gmail.com all right reserved,powered by Gitbook该文件修订时间: 2017-07-11 11:32:48

results matching ""

    No results matching ""