During the development process, I often encounter problems with remote access to MySQL. I need to search every time, which feels too troublesome. I record it here so that I can check it later. First, access the local mysql (log in to the terminal using ssh and enter the following command): After entering the password to log in, enter the following statement: use mysql; grant all privileges on *.* to 'user'@'%' identified by 'password' with grant option; in: user is the user name The default for mysql is root Password is the password you set yourself % represents any host, you can also specify an IP address This allows any remote host to access it. Example: That is, allow 192.168.1.100 to log in as the root user without a password. Okay, that’s all, hope it helps you. You may also be interested in:
|
<<: Solution to the problem that docker nginx cannot be accessed after running
Table of contents 1.1Tinyint Type Description 1.2...
This article describes how to install lamp-php7.0...
It is also very simple to deploy Django projects ...
It's easy to send messages to other users in ...
Table of contents Query cache optimization Overvi...
This section provides an overview of some other i...
Preface I believe everyone is familiar with addin...
Docker private image library Docker private image...
Table of contents Web Components customElements O...
Table of contents The relationship between the co...
Table of contents 01 Common controllers in k8s RC...
When updating a record in MySQL, the syntax is co...
I am planning to organize the company's inter...
You can use the ps command. It can display releva...
Solution to Ubuntu dual system stuck when startin...