How can I restrict my MySQL instance to only allow connections from my local machine?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
MySQL permissions are done by user. To grant privileges to a user from an IP, you would do:
You need to have created a user to use with this, first, though. Read more about MySQL user management here.
Also, if you close your firewall on port 3306 to disallow incoming connections, that will also block them at the OS level.