ALTER TABLE topics DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci ROW_FORMAT default; ALTER TABLE topics MODIFY COLUMN title varchar(255) CHARACTER SET utf8mb4;

Vicw.com用户头像 - XanderCheung XanderCheung 4876 0 1

show engine innodb status; 竖着打印可以用\G代替结尾分号, 如: show engine innodb status\G 显示用户正在运行的线程 show processlist; kill掉锁表的进程ID kill id; 3、查询是否锁表 show OPEN TABLES where...

Vicw.com用户头像 - XanderCheung XanderCheung 3633 0 0

阿里云 rds 遇到问题: Error 1290: The mysql server is running with the lock_write option so it cannot execute this statement 发现是rds数据库服务过期了。

Vicw.com用户头像 - XanderCheung XanderCheung 4624 0 0

程序猿 - Mysql 查询表结构

SELECT COLUMN_NAME 字段名, COLUMN_TYPE 数据类型, IS_NULLABLE 'Null', COLUMN_DEFAULT 'Default', CASE COLUMN_NAME WHEN 'id' THEN '主键' WHEN 'created_at' THEN '创建时间' ...

Vicw.com用户头像 - XanderCheung XanderCheung 574 0 0

SELECT table_schema "DB Name", ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" FROM information_schema.tables GROUP BY table_schema;

Vicw.com用户头像 - XanderCheung XanderCheung 549 0 0

需求:将数据库所有 datetime 类型字段改为 datetime(6) mysql 有一个数据库 information_schema 其中 COLUMNS 表保存了所有数据、所有表的字段信息 mysql> show full columns from information_schema.COLUMNS; +---...

Vicw.com用户头像 - XanderCheung XanderCheung 593 0 0

查看所有数据库的容量 SELECT table_schema AS '数据库', sum( table_rows ) AS '记录数', sum( TRUNCATE ( data_length / 1024 / 1024, 2 )) AS '数据容量(MB)', sum( TRUNCATE ( index_length / 1024 / 1024, ...

Vicw.com用户头像 - XanderCheung XanderCheung 569 0 0

https://stackoverflow.com/a/6474890/15010242 FLUSH PRIVILEGES登录 MySQL 终端时尝试该命令。如果这不起作用,请在 MySQL 终端中尝试以下命令集 mysql -u root mysql> USE mysql; mysql> UPDATE user SET password=PASSWOR...

Vicw.com用户头像 - XanderCheung XanderCheung 164 0 0