1

I am kind of new in the world of Raspberry Pi and Linux in general and I've run into a problem.

I installed weaved to have remote access to my raspberry Pi on my other computers. I have access to the web pages ive put in the Pi's www folder , phpmyadmin and page with php script (without SQL). However, as soon as page need a SQL connection, no information is displayed at all and I don't receive an error either. The same problem happen if I type the IP address of the Pi in the URL. Those pages works on localhost thought. The problem seems very similar to this post How do I open up my MySQL on my Raspberry Pi for Outside / Remote Connections? but after trying the first solution and second solution, it doesn't work at all.

Any idea of what would be the issue?

Community
  • 1
  • 1
Glitcholog
  • 11
  • 1

1 Answers1

1

If your issue is not able to remotely connect with MySQL on Raspberry Pi, then try below steps. I had the same issue and got it resolved by performing below commands.

1) sudo nano /etc/mysql/my.cnf

2) # bind-address = 127.0.0.1 // comment this line out

bind-address = 0.0.0.0          //add this line just below above line 

3) sudo /etc/init.d/mysql restart //restart mysql

4) sudo mysql -u root -p //login to mysql cli as user 'root'

5) GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'beta' WITH GRANT OPTION;

Here 'root' is the mysql user and 'beta' is the password. Change it accordingly and execute above query in mysql cli.

rinoy
  • 471
  • 4
  • 10