cat /var/log/mysqld.log
mysql -u[user] -p[密码] -h[远程主机ip]
mysql -uroot -p
set global validate_password.length=6;
set global validate_password_length=6;
set global validate_password.policy=LOW;
set global validate_password_policy=LOW;
create user 'username'@'ip address' identified with mysql_native_password by 'password';
create user 'username'@'ip address' identified by 'password';
grant all privileges on *.* to 'username'@'ip address' with grant option;
alter user 'root'@'localhost' identified by '123456';
update mysql.user set authentication_string=password('123qwe') where user='root' and Host = 'localhost';
flush privileges;
select user,host from mysql.user;
drop user 'username'@'ip address';
exit
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步