Navicat 远程连接数据库

2021/12/16 sql 环境配置 共 349 字,约 1 分钟

mysql客户端和服务端

sudo apt install mysql-server
sudo apt install mysql-client

设置密码
``` mysql
update user 
set 
    password=password(‘123’) 
where 
    user=’root’;
flush privileges;
sudo netstat -an | grep 3306

# we get
# tcp   0   0   127.0.0.1:3306  0.0.0.0:*   LISTEN

vim /etc/mysql/mysql.conf.d/mysqld.cnf

# comment this line
# bind-address          = 127.0.0.1
use mysql;

update user 
set 
    host = '%' 
where
    user = 'root';
    
flush privileges;

文档信息

Search

    Table of Contents