Difference between revisions of "Pi MySql"
Jump to navigation
Jump to search
Russ hensel (talk | contribs) |
Russ hensel (talk | contribs) |
||
Line 1: | Line 1: | ||
= next mysql = | = next mysql = | ||
+ | |||
+ | 2018 streach update: | ||
<pre> | <pre> | ||
+ | crashed at end but seemed to work >> | ||
sudo apt-get install mysql-server --fix-missing | sudo apt-get install mysql-server --fix-missing | ||
+ | how do I get to this??>> | ||
set password ****** same as for others | set password ****** same as for others | ||
+ | did not work>> | ||
sudo apt-get install mysql-client php5-mysql | sudo apt-get install mysql-client php5-mysql | ||
+ | ran fine >> | ||
sudo apt-get install mysql-workbench | sudo apt-get install mysql-workbench | ||
</pre> | </pre> | ||
− | mySql workbench now on menu | + | mySql workbench now on menu for programming. |
+ | |||
+ | what is default pass and id ?? | ||
Revision as of 15:01, 20 January 2018
Contents
next mysql
2018 streach update:
crashed at end but seemed to work >> sudo apt-get install mysql-server --fix-missing how do I get to this??>> set password ****** same as for others did not work>> sudo apt-get install mysql-client php5-mysql ran fine >> sudo apt-get install mysql-workbench
mySql workbench now on menu for programming.
what is default pass and id ??
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
This can be done in the workbench how do we allow them remote access and access to our db and table?
misc
Restarting The MySQL service
sudo service mysql restart
make db
schema env_data_1 CREATE TABLE `env_data_table_1` ( `gh_time` decimal(14,2) NOT NULL, `temp_1` float DEFAULT NULL, `temp_2` float DEFAULT NULL, `humid_1` float DEFAULT NULL, `humid_2` float DEFAULT NULL, `door_1` int(11) DEFAULT NULL, `door_2` int(11) DEFAULT NULL, `door_3` int(11) DEFAULT NULL, `door_4` int(11) DEFAULT NULL, `light` float DEFAULT NULL, PRIMARY KEY (`gh_time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
for python
and that did it the pip now worked then
pip install pymysql