Home > Database > navicat > body text

Detailed solution for navicat unable to connect to ubuntu

爱喝马黛茶的安东尼
Release: 2019-08-06 15:16:13
Original
3571 people have browsed it

Detailed solution for navicat unable to connect to ubuntu

First, sufo ufw status checks whether the firewall is turned on. If the status is inactive, it means that the firewall is not turned on.

Detailed solution for navicat unable to connect to ubuntu

Then enter netstat -an|grep 3306 to check the port startup and occupancy. You can see that the binding is 127.0.0.1. We need to change this to 0.0.0.0. Will talk about it below.

Detailed solution for navicat unable to connect to ubuntu

First you must modify the mysql access permissions, enter mysql -u root -p, press Enter, and then enter the password 123456 to enter the mysql command line.

Detailed solution for navicat unable to connect to ubuntu

Enter grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option; Specify that all clients can use the root account to access mysql.

Detailed solution for navicat unable to connect to ubuntu

Related recommendations: "Navicat for mysql graphic tutorial"

Enter flush privileges; refresh permission settings.

Detailed solution for navicat unable to connect to ubuntu

Enter exit; to exit the mysql command line.

Detailed solution for navicat unable to connect to ubuntu

Enter cd /etc/mysql/mysql.conf.d to enter the mysql configuration directory.

Detailed solution for navicat unable to connect to ubuntu

Enter vim mysqld.cnf to modify the mysql configuration file.

Detailed solution for navicat unable to connect to ubuntu

Find bind-address and modify 127.0.0.1 to 0.0.0.0.

Detailed solution for navicat unable to connect to ubuntu

Enter /etc/init.d/mysql restart to restart mysql.

Detailed solution for navicat unable to connect to ubuntu

Use navicat to connect to mysql again, and finally you can connect.

Detailed solution for navicat unable to connect to ubuntu

The above is the detailed content of Detailed solution for navicat unable to connect to ubuntu. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!