MySQL

来自康健生活
Kangkk​(留言 | 贡献)2026年1月19日 (一) 11:46的版本 (→数据类型)

前言

安装

安装常见问题
Docker 编译 Ubuntu MacOS

配置文件

配置文件

注释

注释

操作语言

DML(Data-Manipulation Language) DDL(Data-Definition Language)

概念

元组 数据字典 散列
dbms 示例 示例
示例 示例 示例

符号与无符号

无符号(unsigned)表示设置的数字是 [0, +∞]。

数据类型

数字类型
整数 TINYINT SMALLINT MEDIUMINT INT(INTEGER) BIGINT
浮点数 FLOAT DOUBLE real DECIMAL


日期和时间
DATE TIME DATETIME TIMESTAMP YEAR
字符串类型
字符串 CHAR VARCHAR
文本 TINYTEXT TEXT MEDIUMTEXT LONGTEXT
二进制
TINYBLOB BLOB MEDIUMBLOB LONGBLOB

条件

条件

工具

sqlfiddle 示例 示例

备份

定时备份

其他

mariadb phpMyAdmin uninstall
centos_install workbench 示例
示例 示例 示例

案例

实例

日期 示例 示例
示例 示例 示例
示例 示例 示例

示例

常见问题

关于周日定义 示例 示例
示例 示例 示例
示例 示例 示例

ERROR

链接释放 Swap max_open_files
示例 示例 示例
示例 示例 示例

error

  • Storage engine MyISAM is disabled (Table creation is disallowed).
mysql v8 不支持地分区策略。
  • The MySQL server is running with the --read-only option so it cannot execute this statement
连到从库
  • You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
  • Cannot add foreign key constraint,
  • Node.js: Connection Error: Error: Connection lost: The server closed the connection
Node.js 连接 Mysql 的版本要求,MySQL Connector/Node.js

参考