Ubuntu 15.04 opens mysql remote port 3306

Ubuntu 15.04 opens mysql remote port 3306

Ubuntu 15.04 opens MySQL remote port 3306. All the following operations are performed in the terminal.

First check if the port is open netstat -an | grep 3306

This is a screenshot of opening port 3306. Previously it was displayed as . . . 127.0.0.1:3306 . . .

Open the mysql configuration file vi /etc/mysql/mysql.conf.d/mysqld.cnf
Unregister bind-address = 127.0.0.1

The bottom line of the screenshot is logout

Restart Ubuntu

Check again whether the port is open netstat -an | grep 3306

At this point port 3306 is open and you can authorize access to mysql using sudo
Command: sudo mysql -u root -p

Enter the local password the first time and the mysql password the second time

Authorize the root user to all connections: grant all privileges on *.* to 'root'@'%' identified by 'xxxxxx';

The last one is the mysql password

Let the permissions take effect immediately: flush privileges;

Now all operations are completed and you can connect to this MySQL database server from any host.

Solution to MySQL remote connection failure: https://www.jb51.net/article/103770.htm

Centos7.1 firewall open port: https://www.jb51.net/article/103777.htm

CentOS 7 open ports: https://www.jb51.net/article/103773.htm

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • How to enable remote connection to MySQL database
  • Detailed explanation of remote connection to MySQL authorization method
  • Solution to MySQL remote connection loss problem (Lost connection to MySQL server)
  • mysql remote connection database method collection
  • How to configure mysql to allow remote connections
  • The Ultimate Method for MySQL Remote Access Settings
  • Summary of how to set remote access permissions for MySQL database
  • How to solve the problem of slow remote connection to MySQL (mysql_connect opens the connection slowly)
  • How to set up remote access to mysql database
  • Solution to Navicat's inability to remotely connect to MySQL

<<:  Linux concurrent execution is simple, just do it this way

>>:  The implementation process of Linux process network traffic statistics

Recommend

CSS and HTML and front-end technology layer diagram

Front-end technology layer (The picture is a bit e...

Detailed explanation of SQL injection - security (Part 2)

If there are any errors in this article or you ha...

The most common mistakes in HTML tag writing

We better start paying attention, because HTML Po...

Tutorial on resetting the root password of Mac MySQL

Disclaimer: This password reset method can direct...

Simple implementation of Mysql add, delete, modify and query statements

Simple implementation of Mysql add, delete, modif...

JavaScript to achieve click image flip effect

I was recently working on a project about face co...

Django+vue registration and login sample code

register The front-end uses axios in vue to pass ...

Use Shell scripts to batch start and stop Docker services

Table of contents Start Docker Stop Docker Python...

Detailed tutorial on installing MySQL 8.0.20 database on CentOS 7

Related reading: MySQL8.0.20 installation tutoria...

VMware ESXi installation and use record (with download)

Table of contents 1. Install ESXi 2. Set up ESXi ...

Appreciation of the low-key and elegant web design in black, white and gray

Among classic color combinations, probably no one...

URL Rewrite Module 2.1 URL Rewrite Module Rule Writing

Table of contents Prerequisites Setting up a test...

How to restore single table data using MySQL full database backup data

Preface When backing up the database, a full data...