mysql -u root -p
mysql> GRANT ALL PRIVILEGES ON *.* TO 'ctk'@'%' IDENTIFIED BY 'password';
mysql> flush privileges;
Enable access from an external IP By default mysql is only listening from 127.0.0.1.
sudo nano -w /etc/mysql/mysql.conf.d/mysqld.cnf
Change to
[mysqld]
bind-address = 0.0.0.0
Restart
sudo systemctl restart mysql