![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
心中翼
这个作者很懒,什么都没留下…
展开
-
阿里云服务器连不上mysql数据库
1、连不上mysql数据库一般先检测linux服务器是否启动mysql服务。netstat -anpt2、检测连接用户是否拥有远程连接权限,对应用户的host值是否为'%'select user,host from mysql.user ;update mysql.use set host = '%' where user = 'dev' ;3、阿里云服务器是否添加3306安全组...原创 2018-04-19 23:11:12 · 2711 阅读 · 0 评论 -
mysql 分组查询数据,如何将null与‘’分为一组数据
1、需求分析 将数据使用group by 分组,某个字段既有null值,又有''值,想将这两种数据都分为一类命名为other。2、mysql语句 select count(id) total, case name when '' then 'other' else ifnull(name ,'other') end name ...原创 2018-06-07 11:10:17 · 3136 阅读 · 0 评论