Use only strong passwords for the database connection. A strong password should include letters in varying case, digits and punctuation marks and contain at least 8 characters. This will reduce the risk of successful password bruteforce.
The database should be accessed using a dedicated account with minimum sufficient access privileges (not "root").