摘要:错误提示: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column
阅读全文
摘要:查看mysql当前是否支持编写自定义 SHOW variables like '%fun%'; 开启自定义函数 set global log_bin_trust_function_creators=1; 示例,regexp_replace(正则替换) #创建前删除已经创建的自定义函数 drop fu
阅读全文
摘要:类型一,AAAA select phone from user_info where LENGTH(phone) = 11 AND SUBSTRING(phone,8,1) = SUBSTRING(phone,9,1) AND SUBSTRING(phone,9,1) = SUBSTRING(pho
阅读全文
摘要:group by 分组 select test1,test2,test3 from emp group by test1 ,test2,test3 最优先的是相同字段,进行分组。 如果需要用到了别的字段,最好跟上个id。然后把结果集作为一张待用表,来跟别的表进行联合操作。 根据后面的字段来分组 ,如
阅读全文
摘要:问题一、 is not allowed to connect to this mysql server 原因:修改帐号不允许从远程登陆。 解决:登入MySQL后,更改 "mysql" 数据库的 "user" 表的 "host"项,从"localhost"改称"%" ① mysql -u root -
阅读全文
摘要:1、登录MySQL mysql -uroot -p 2、进入 名为"mysql"的数据库 use mysql 3、修改user表的host update user set host = '%' where user = 'root'; select host, user from user; 4、刷
阅读全文