MariaDB(MySQL) server remote client access

Modify configuration file

Debian MariaDB packages disabled remote access by:

  1. bind MariaDB to 127.0.0.1.(not listen remote request):
    bind-address = 127.0.0.1
  2. disable TCP/IP networking:
    skip-networking

Enable remote access:

find the 2 options above in /etc/mysql/mariadb.conf.d/50-server.cnf comment out it and add 2 lines below at the end of the file:

skip-networking=0
skip-bind-address

Grant user remote access

Examples:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.100.%' 
  IDENTIFIED BY 'my-new-password' WITH GRANT OPTION;

% and * is wildcard, you can try:

GRANT ALL PRIVILEGES ON db1.* TO 'root'@'%' 
  IDENTIFIED BY 'my-new-password' WITH GRANT OPTION;

Flutter,Server

Posted by Bee