登陆mysql
mysql -u root -p;
查询mysql用户
select user,password,host from user;
创建远程登录root账号并设置密码
GRANT ALL PRIVILEGES ON * . * TO ‘root‘@‘%‘ IDENTIFIED BY ‘你的密码‘ WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
注:如果要指定IP地址登陆就把%换成IP地址。
时间: 2024-11-09 00:09:31