Python support for I2C smbus and MySQL
pip install MySQL-python
apt-get install libmysqlclient-dev build-essential libi2c-dev i2c-tools python-dev libffi-dev
pip install cffi
pip install smbus-cffi
apt-get install python-mysqldb
apt-get install python-smbus
SMBUS and MySQL
-
- Site Admin
- Posts: 2449
- Joined: Wed 25 Feb 25 2009 8:00 pm
Re: SMBUS and MySQL
For Ubuntu 18.04 you need a special password to log into the system to get things going:-
https://stackoverflow.com/questions/339 ... 5#50305285
Specifically, you need to:-
sudo cat /etc/mysql/debian.cnf
and then using the user and password provided:-
mysql -u debian-sys-maint -p
After entering the password, you will be in the console:-
select User, Host, plugin from mysql.user;
update user set plugin='mysql_native_password' where User='root';
flush privileges;
alter user 'root'@'localhost' identified by 'new-password';
flush privileges;
update user set Host='%' where User='root';
flush privileges;
exit
The restart the mysql server:-
sudo service mysql restart
https://stackoverflow.com/questions/339 ... 5#50305285
Specifically, you need to:-
sudo cat /etc/mysql/debian.cnf
and then using the user and password provided:-
mysql -u debian-sys-maint -p
After entering the password, you will be in the console:-
select User, Host, plugin from mysql.user;
update user set plugin='mysql_native_password' where User='root';
flush privileges;
alter user 'root'@'localhost' identified by 'new-password';
flush privileges;
update user set Host='%' where User='root';
flush privileges;
exit
The restart the mysql server:-
sudo service mysql restart
-
- Site Admin
- Posts: 2449
- Joined: Wed 25 Feb 25 2009 8:00 pm