mysql 杂项

来源:互联网 发布:ubuntu 16.04 挂载u盘 编辑:程序博客网 时间:2024/05/29 19:02

pip install MySQL-python

log in local machine

mysql -u root -p

conn=MySQLdb.connect(host=’localhost’,user=’root’,passwd=’123456’)

cur=conn.cursor()

cur.execute(‘create database if not exists python’)

  • 中文乱码问题
    show variables like “%char%”;
    SET NAMES utf8
0 0
原创粉丝点击