How do I open up my MySQL on my Raspberry Pi for Outside / Remote Connections?

后端 未结 3 1173
再見小時候
再見小時候 2020-12-05 04:48

I have a Raspberry Pi that stores temperature data for homebrewing activity. I am making a Spring MVC application on my computer and I want to tap the data. Both my Pi and m

3条回答
  •  日久生厌
    2020-12-05 05:31

    The following worked for me, courtesy of a comment found on this instructable:

    1. Grant access to your remote machine using: GRANT ALL ON *.* TO 'root'@'192.168.1.%' IDENTIFIED BY 'your_password_here'; (I used 192.168.1.% so that any computer on my network can connect to it)
    2. Go into the my.cnf file (sudo nano /etc/mysql/my.cnf) file and look for "bind-address" and comment this out (put a # in front of the line)
    3. Reload MySQL config (service mysql reload)
    4. Restart MySQL server (service mysql restart)

提交回复
热议问题