GUI 图形界面
MySQL强烈推荐HeidiSQL,免费。scoop 可安装。官方的 workbench 总感觉图形元素、字体太小,看着不舒服。
SQLite 的 GUI 不如mysql的强大好用,目前推荐 sqlitebrowser,开源免费。
创建table前,检查是否存在:create table if not exists
例如:
CREATE TABLE IF NOT EXISTS "event" (
"id" INTEGER NOT NULL PRIMARY KEY,
"key" TEXT NOT NULL,
"timestamp" DATETIME NOT NULL,
"metadata" TEXT NOT NULL);
Mysql INSERT、REPLACE、UPDATE的区别
参看:https://my.oschina.net/chinahub/blog/505119注:sqlite 也支持 replace
python mysql helper
https://github.com/luvvien/python-mysql-helperhttps://github.com/sweetycode/sqlexec
https://github.com/ItisDL/python-mysql-helper
https://github.com/Shypes/python-mysql-connector-wrapper
https://github.com/DropFan/mysql_helper
python mysql dump
https://github.com/Larryrun80/MysqlDumper
关闭 mysqld 服务
windows的mysql自带一个Notifier,可以启动,关闭mysqld服务。Linux中,直接使用service mysqld stop/start 关闭服务。 使用 ps aux |grep mysqld 查看mysql进程是否关闭。
mysql, sqlite: 关于 backtick(`,tab键上方的案件)
“mysql 的 backtick ` 符号”等同于“sqlite 的 "" 引号”。
https://stackoverflow.com/questions/10573922/what-does-the-sql-standard-say-about-usage-of-backtick
Difference Between Schema / Database in MySQL
简单来说,在 MySQL 里 schema = database。在其他一些 sql 里,schema 是 database 的子集,schema 表示某用户有权限的 database 的子集。https://stackoverflow.com/questions/11618277/difference-between-schema-database-in-mysql
mysql中的utf8mb4、utf8mb4_unicode_ci、utf8mb4_general_ci
结论:用 utf8mb4_general_cihttps://www.cnblogs.com/amyzhu/p/9595665.html
mysql 两个数据库同步数据
https://dba.stackexchange.com/questions/65351/sync-two-mysql-databases-in-two-different-locations