So I am going to walk you through everything I have done since I created this. Since this is a test before I run it for production.
ssh in, change root password adduser (new user added) usermod -aG sudo (new user) ufw limit ssh/tcp ufw limit (new ssh ip/tcp) ufw allow 3306 edit /etc/ssh/sshd_config (change ssh port and disallow root login) systemctl restart ssh (disconnect and reconnect via port 22 to make sure ssh isn’t listening. Try new port and make sure root doesn’t allow login.) Sign in via new credentials. ufw enable ufw status (verify 3306 is open) apt update apt upgrade apt install mysql-server mysql (create database) mysql (create user -> create user “user”@“%” identified by “password”; ) mysql (grant all on database.* to “user”@“%”;) mysql flush privileges; edit /etc/mysql/mysql.conf.d/mysqld.cnf set bind-address to database server ip (save & exit) systemctl restart mysql netstat -ln | grep 3306 (verify mysql is listening) attempt to connect using https://www.rainbowspuppiessunshine.com/tools/dbtest/index.php connection tool.
I get an error (111 failed to connect)
I have also tried securing the connection via a few guides and still no luck. I tried an alternate connection tool and it said refused to connect.
so I disabled the firewall (since this is just a test server)
ufw disable ufw status (verified it was disabled) tried the connection again, still nothing. refused to connect and failed to connect
there is no cloud firewall unless it’s allocated by digital ocean.
I have tried this various times and on various droplets. If I use the mysql one clicks I can’t even change the bind address without getting a fail error when mysql reloads.
I am out of ideas here. Any help or ideas would be appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!