import MySQLdb//定义引用数据库的驱动文件 import serial import time ser = serial.Serial('/dev/ttyATH0', 115200, timeout=65)//读串口 while True: data = ser.readline() print repr(data)//输出读到的数据 conn=MySQLdb.connect(host='192.168.2.1',user='root',passwd='root',db='ma'/
1,针对mysql操作 SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass'); 设置密码 update user set password=passworD("test") where user='root';修改密码 flush privileges; grant all on *.* to root@'%' identified by 'your_password'; mysql> select user,pass