Setup Mysql Database For Remote Access

Here are unopen to useful guidelines inward setting upward a mysql server for remote access inward Ubuntu.


  1. Install as well as configure mysql server.
    sudo apt-get update sudo apt-get install mysql-server mysql_secure_installation 
    *Note inward MySQL - it volition enquire to laid upward the password simply non inward MariaDB
  2. Bind MySQL to earth IP where it is hosted yesteryear editing the file MySQL: /etc/conf/my.cnf or MariaDB: /etc/mysql/mariadb.conf.d/50-server.conf, the cnf file is sometimes pointing to unopen to other file - brand certain to depository fiscal establishment stand upward for that. Search for the business amongst "bind-address" string. Set the value to your IP address or comment the bind-address line.
  3. Make certain that your user has plenty privilege to access the database remotely:
    create user 'lacus'@'localhost' identified yesteryear 'lacus'; grant all privileges on *.* to 'lacus'@'localhost' <with grant option>; practise user 'lacus'@'%' identified yesteryear 'lacus'; grant all privileges on *.* to 'lacus'@'%' <with grant option>; 
  4. Open port: 3306 inward the firewall:
    sudo ufw permit 3306/tcp sudo service ufw restart 
Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.