Posted 2019-12-31 with tags MySQL, MariaDB, RDBMS, system administration

Assign General Privileges

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';

Assign Grant Privileges

GRANT USAGE ON *.* TO 'root'@'%' WITH GRANT OPTION;

Flush Privileges

FLUSH PRIVILEGES;

Update bind-address Setting in MySQL Config File

Find the bind-address setting in the mysql config file (my.cnf, or mysqld.cnf, etc. (varies based on OS and setup)), and comment it out so that mysql listens for connections from remote hosts.

Restart MySQL Service

sudo service mysql restart

Obviously there are security concerns with allowing remote access to any mysql user with full privileges. Use a good password and setup a firewall to deny all connection attempts to the MySQL host and whitelist only the IP addresses you wish to connect from.