这里使用的是阿贝云服务器
提示: 这是第二版本 因为第一版本丢失 部分没有实际对照图片
1. 首次安装等待大约 30 分钟 直到 可以范文 服务器端口
2. 找到首页 安装 Mysql
4. 用本地navicat 连接输入远程连接地址会 报错 **Host 222.22.89.0 not allow on this Mysql xx
5.解决错误 使用 ssh连接工具 finalshell
输入mysql u root p 报错 mysql登录
报错 “Access denied for user ‘root’@‘localhost’ (using password: YES”)**
处理
关闭mysql服务
service mysqld stop
安全模式进入mysql
mysqld_safe —skip-grant-table
另外开一个命令窗口
mysql -u root mysql
这样root用户就不需要密码进入了mysql
接下来,更新user表
先看看用户、host和密码,sql语句
select user,host,password from user;
更新表,sql语句
update user set password = password(“要设置的密码”) where user=’root’;
使更改生效
flush privileges;
退出
exit或者\q
之后,再一次mysql -u root -p ,键入刚设置的密码
5. 配置所有ip访问
mysql安装后默认是localhost访问,如果需要外部访问可以设置一个新的账号把host改为%,意味着所有ip均可以访问
grant all privileges on . to ‘outUser’@’%’ identified by ‘12’ with grant option
指定ip访问配置
进行授权操作:
GRANT select,insert,update,delete ON . TO root@“你的电脑ip地址” IDENTIFIED BY “youpassword”;
重载授权表:
FLUSH PRIVILEGES;
退出mysql数据库:
exit
到这里就可以使用 navicat 访问远程Mysql服务器了