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
1. Find out whether MySQL was installed before Co...
1. Introduction I recently worked on a project an...
In web page production, input and img are often pl...
This article shares the specific code of js to ac...
Mac latest version of MySQL 8.0.22 password recov...
Anyone who has worked on a large system knows tha...
Table of contents Build Vuex environment Summariz...
1. Prerequisites We use the require.context metho...
Gird layout has some similarities with Flex layou...
1. Interconnection between Docker containers Dock...
This article example shares the specific code for...
This article shares the specific code for React t...
Translucent border Result: Implementation code: &...
When I first taught myself web development, there...
Mac node delete and reinstall delete node -v sudo...