Difference between revisions of "Pi MySql"

From OpenCircuits
Jump to navigation Jump to search
Line 21: Line 21:
 
sudo leafpad /etc/mysql/my.cnf
 
sudo leafpad /etc/mysql/my.cnf
  
2) # bind-address = 127.0.0.1 // comment this line out
+
# bind-address = 127.0.0.1 // comment this line out
 
+
#add this line just below above line
bind-address = 0.0.0.0         //add this line just below above line
+
bind-address = 0.0.0.0        
3) sudo /etc/init.d/mysql restart //restart mysql
+
//restart mysql
 +
sudo /etc/init.d/mysql restart  
 
</pre>
 
</pre>
  

Revision as of 17:13, 21 November 2016

next mysql


sudo apt-get install mysql-server --fix-missing  

set password ****** same as for others

sudo apt-get install mysql-client php5-mysql

sudo apt-get install mysql-workbench

mySql workbench now on menu


enable remote access

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.

sudo leafpad /etc/mysql/my.cnf

# bind-address = 127.0.0.1 // comment this line out
 #add this line just below above line 
bind-address = 0.0.0.0         
//restart mysql
sudo /etc/init.d/mysql restart 

later might want to look at https://serverfault.com/questions/139323/mysql-bind-to-more-than-one-ip-address

make non root user

misc

Restarting The MySQL service

sudo service mysql restart

make db

for python

and that did it the pip now worked then

pip install pymysql