Grant remote access permission to MySQL server

Login to your mysql/mariadb console:

sudo mysql -u <user> -p

Run this command:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'YoUrP45sw0rd!' WITH GRANT OPTION;

Don’t forget to flush the privileges

FLUSH PRIVILEGES;

If user still cannot see the tables, try to disconnect mysql and reconnect again.

Leave a Comment