美文网首页
ubuntu下远程连接数据库

ubuntu下远程连接数据库

作者: 源猿袁 | 来源:发表于2018-08-16 22:39 被阅读0次
  • apt-get 安装
  • 源码安装
    • ./configure --prefix=/usr/local/ --with-名字=路径
    • make
    • make install
  • dkpg安装 debain

sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install libmysqlclient-dev

service mysql start

ps -aux | grep mysql
netstat -ntlp | grep 3306

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

bind-address 127.0.0.1 改为 0.0.0.0
service mysql restart

mysql -u root -p

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)

windows 上面 就可以使用 navicat 连接 远程数据库

相关文章

网友评论

      本文标题:ubuntu下远程连接数据库

      本文链接:https://www.haomeiwen.com/subject/akoibftx.html