![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SQL
JadePlus
大学本科
展开
-
MySQL 8.0.29在my.cnf设置sql_mode之后MySQL无法启动
解决:MySQL在8以后sql_mode已经取消了NO_AUTO_CREATE_USER这个关键字。去掉这个关键字后,重启成功!在日志里也没有找到有用的信息,但将此项配置去掉,MySQL便可正常启动。MySQL在my.cnf加上sql_mode后无法启动。下面这个配置才是可以正常启动的哦。原创 2022-11-11 14:34:16 · 2683 阅读 · 0 评论 -
MySQL,跨库联表更新语句UPDATE、SELECT
UPDATE `db01`.`user` AS aINNER JOIN ( SELECT COUNT(t.id) AS cjs_count, t.user_id FROM `db02`.`trace` AS t GROUP BY t.user_id) AS b ON a.user_id = b.user_idSET a.trace_count = b.cjs_count;这是一个典型的跨库联表更新语句首先对db02数据库的trace表按照用户id进行汇总,将其统计结果更.原创 2022-05-21 11:55:11 · 1983 阅读 · 0 评论 -
MySQL查询指定库中所有的表记录的行数,表的大小,创建时间,字符集
SELECT TABLE_NAME AS '表名', TABLE_ROWS AS '记录数', DATA_LENGTH/1024/1024 AS '表大小(MB)', CREATE_TIME AS '创建时间', TABLE_COLLATION AS '字符集' FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'dingdingwork'原创 2015-01-21 09:51:38 · 638 阅读 · 0 评论 -
PDO执行execute方法后无任何返回,通过try catch 得到如下异常信息
SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run原创 2017-11-04 13:47:58 · 1781 阅读 · 0 评论