mysql -hlocalhost -uroot -p回车然后输入密码; mysql> use mysql; // 创建远程访问权限的用户admin ,密码:123456 CREATE USER ‘admin‘@‘192.168%‘ IDENTIFIED BY ‘123456‘; // 赋权 grant all privileges on *.* to ‘admin‘@‘192.168%‘ identified by ‘123456‘ with grant option; mysql> flush privileges; select * from host;
时间: 2024-11-03 21:56:31