1.创建数据库(utf8)
CREATE DATABASE `meta` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
show databases;
2.开启远程连接
GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘mypassword‘ WITH GRANT OPTION
flush privileges;
3.修改密码
SET PASSWORD FOR ‘root‘@‘localhost‘ = PASSWORD(‘newpass‘);
flush privileges;
时间: 2024-10-26 19:57:44