How to Whitelist an IP Address in MySQL Server?
A guide to whitelist Superjoin’s IP address in your MySQL server to connect MySQL to Google Sheets using Superjoin.
Superjoin’s IP Address is 34.100.193.122. Whitelist this IP Address in your database and allow TCP/IP connection from this IP in your firewall.
What is “Whitelisting”?
Think of your database like a private party. The “whitelist” is your guest list. Only the IP addresses (unique identifiers for computers on the internet) on this list can “enter the party,” i.e., connect to your database. IPs not on the list will receive the metaphorical “you’re not on the list” and cannot connect.
Step by Step Guide to IP Whitelisting in your MySQL DB
#1 Speak to your IT Admin
#1 Speak to your IT Admin
If you’re not hands-on with database management, contacting your IT admin is the best approach
Provide the IP
Request Whitelisting
Test the Connection
Reach Out for Support
#2 Whitelist it yourself
#2 Whitelist it yourself
If you’re ready to handle this yourself, here’s how you can whitelist IP addresses for MySQL.
Solution
Log Into Your Server
Edit Config (1/3)
/etc/mysql/my.cnf
or similar) using a text editor.Edit Config (2/3)
bind-address
directive and change its value to 0.0.0.0
to allow connections from any IP (be cautious with this setting).Edit Config (3/3)
skip-networking=0
is set under [mysqld]
. Save and exit.Restart MySQL
sudo service mysql restart
to apply changesGrant Access to Superjoin
Log into MySQL with mysql -u root -p
. & Run the Command GRANT ALL PRIVILEGES ON your_database_name.* TO 'your_username'@'34.100.193.122' IDENTIFIED BY 'your_password'; FLUSH PRIVILEGES;
Reach Out for Support
#3 Whitelist in Google Cloud (Cloud SQL)
#3 Whitelist in Google Cloud (Cloud SQL)
Navigate to Google Cloud Console
Authorize Networks
Reach Out for Support
AWS Whitelisting
Whitelisting an IP for your MySQL, Amazon Redshift, or PostgreSQL database doesn’t just bolster security—it ensures that only authorized locations can access your data. Whether you choose to manage this process yourself or coordinate with IT professionals, ensuring your database’s security is crucial. Remember, if you’re ever unsure, consulting with an expert is always a wise decision. Happy data managing!