Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

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!
I think changing the root user to someone not called root should be much higher on this list, very good practice.
@Lewis: As long as MySQL only allows access from 127.0.0.1 and root login from ‘root’@‘127.0.0.1’, I don’t see why that would be a problem.
There are one incorrect liine:
SELECT User,Host,Password FROM mysql.user
Thanks for this useful tutorial. Does DO have any additional security offering where a droplet hosting a DB server can only be accessed behind a firewall? Do you have other suggestions to make a droplet more secure to be suitable for hosting sensitive data?
Some of the new data centers have private networking available to droplets
“bind-address = 127.0.0.1 This makes sure that MySQL is not accepting connections from anywhere except for the local machine.”
How should i configure this step to allow secure connections from another servers? Maybe some whitelists or how?
@b82a: Set bind-address to 0.0.0.0 and configure your firewall to only allow specific IPs to connect to port 3306 (including 127.0.0.1).
<a href=“https://www.digitalocean.com/community/community_tags/firewall”>https://www.digitalocean.com/community/community_tags/firewall</a>.
Really useful tutorial.
I’ve updated users hosts from % to localhost as suggested. But when I look at the users in phpMyAdmin, these users are duplicated. I have two entries for each user I updated with the commands above in the tutorial. Like:
user_name % -- usage (...)
user_name localhost Yes usage (...)
Should I leave or delete the users with % as host?
@tbnv: You shouldn’t use % as the host unless you want to allow any server to connect to your MySQL server and use that user. If your MySQL server is installed on the same server as Apache or your program that’s accessing the database, you can safely remove the entries that have their host set to %.
Hi, I also stumbled upon a thread online for securing phpmyadmin: Link
The guy said to do the following:
Remove file_priv permissions from every account. file_priv is one of the most dangerous privileges in MySQL because it allows an attacker to read files or upload a backdoor.
and
Firewall off tcp port 3306.
In my case, I don’t connect phpmyadmin remotely. I only access it via 127.0.0.1. So are those 2 suggestions even necessary? If they are, how to set it up on nginx (remove file_priv permission and firewall port 3306)? The article was written on April 2010, so I don’t know if the Ubuntu 14.04 already covers those 2 things by default.