Allow remote access MySQL, Ubuntu

前端 未结 3 866
北恋
北恋 2020-12-21 10:27

Im trying to allow remote accecss to MySQL on my Ubuntu server (VPS).

Im trying to access the database through an Java application Im building in Netbeans. Netbeans

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-21 11:00

    You need to grant access to that database :

    GRANT ALL ON foo.* TO bar@xxx.xxx.xxx.xxx IDENTIFIED BY 'PASSWORD';
    

    And also updated the firewall rules something like :

    /sbin/iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT
    

提交回复
热议问题