随笔分类 -  MySql

摘要:一、打开Tools 二、填写以下脚本 '****************************************************************************** '* File: pdm2excel.txt '* Title: pdm export to exce 阅读全文
posted @ 2022-07-12 14:46 秋飘 阅读(324) 评论(0) 推荐(0) 编辑
摘要:查询Mysql数据容量 select table_schema as '数据库', sum(table_rows) as '记录数', sum(truncate(data_length/1024/1024, 2)) as '数据容量(MB)', sum(truncate(index_length/1 阅读全文
posted @ 2022-07-06 13:55 秋飘 阅读(56) 评论(0) 推荐(0) 编辑
摘要:当前时间 select now() 一、日期 NOW():"2021-09-03 10:01:47" -- 日期带时分秒 CURDATE() :"2021-09-03" -- 日期不带时分秒 DATE_FORMAT(NOW(),'%Y-%m-%d %h:%i:%s') --自定义日期格式(Y:必须大 阅读全文
posted @ 2021-09-13 10:18 秋飘 阅读(139) 评论(0) 推荐(0) 编辑
摘要:导出: window下 1.导出整个数据库 mysqldump -u 用户名 -p 数据库名 > 导出的文件名 mysqldump -u dbuser -p dbname > dbname.sql 2.导出一个表 mysqldump -u 用户名 -p 数据库名 表名> 导出的文件名 mysqldu 阅读全文
posted @ 2021-07-10 14:46 秋飘 阅读(2155) 评论(0) 推荐(0) 编辑
摘要:数据库查看各表大小 SELECT table_schema AS '数据库', table_name AS '表名', table_rows AS '记录数', TRUNCATE (data_length / 1024 / 1024, 2) AS '数据容量(MB)', TRUNCATE (inde 阅读全文
posted @ 2021-06-17 14:50 秋飘 阅读(140) 评论(0) 推荐(0) 编辑
摘要:SELECT CONCAT( 'ALTER TABLE `', table_name, '` DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci;' ) FROM information_schema.TABLES WHERE table_schem 阅读全文
posted @ 2020-07-28 11:14 秋飘 阅读(346) 评论(0) 推荐(0) 编辑
摘要:脚本示例: @echo off set hour=%time:~0,2% if "%time:~0,1%"==" " set hour=0%time:~1,1% set now=%Date:~0,4%%Date:~5,2%%Date:~8,2%%hour%%Time:~3,2%%Time:~6,2% 阅读全文
posted @ 2020-05-19 11:31 秋飘 阅读(3665) 评论(0) 推荐(1) 编辑
摘要:1. 访问搜狐镜像 http://mirrors.sohu.com/mysql/MySQL-5.7/ 下载 mysql-5.7.23-winx64.msi 2. 安装 mysql-5.7.23-winx64.msi ,选择custom方式安装,就可以选择安装路径,否则默认安装在C盘,然后一路 nex 阅读全文
posted @ 2020-05-11 14:39 秋飘 阅读(2012) 评论(0) 推荐(0) 编辑
摘要:【错误代码:1064 】 ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right sy 阅读全文
posted @ 2020-04-22 14:59 秋飘 阅读(3823) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示