使用Navicat连接腾讯云Mysql数据库

使用Navicat连接腾讯云Mysql数据库

1、安装

  # 安装mysql服务
  sudo apt-get install mysql-server
  # 安装客户端
  sudo apt install mysql-client
  # 安装依赖
  sudo apt install libmysqlclient-dev
  # 检查状态
  sudo netstat -tap | grep mysql

2、修改密码

update mysql.user set authentication_string=PASSWORD('123456'), plugin='mysql_native_password' where user='root';

flush privileges;       -- 刷新权限

3、编辑配置文件

# 修改配置文件,注释掉bind-address = 127.0.0.1
> sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
# bind-address          = 127.0.0.1     -- 注释该行
# * Fine Tuning

# 保存退出

4、配置远程登录

mysql> grant all on *.* to root@'%' identified by '123456' with grant option;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> select user,host from user;

+------------------+-----------+
| user             | host      |
+------------------+-----------+
| admin            | %         |
| debian-sys-maint | %         |
| root             | %         |
| debian-sys-maint | localhost |
| mysql.session    | localhost |
| mysql.sys        | localhost |
+------------------+-----------+
6 rows in set (0.00 sec)

mysql> exit
Bye

> sudo /etc/init.d/mysql restart

Navicate在Mac的替代工具:sequelpro

posted @ 2021-06-20 00:30  DeyouKong  阅读(264)  评论(0编辑  收藏  举报