ubantu安装Mysql

 

1:更新一下源列表
sudo apt-get update 不更新会出现有几个软件包无法下载
2:安装mysql
sudo apt-get install mysql-server mysql-client
3:mysql服务进行重新启动
sudo service mysql restart
4:登录mysql
mysql -uroot -p

5.创建用户

create user shark identified by 'shark';

6.用户授权远程连接

grant all privileges on *.* to 'shark'@'%' identified by 'shark' with grant option;

7.刷新权限

FLUSH PRIVILEGES;

8.用navicat连接(多次尝试连接)

 

posted @ 2020-04-20 11:47  不会飞的鲨鱼  阅读(119)  评论(0编辑  收藏  举报