![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
路人万
不积跬步,无以至千里;不积小流,无以成江海。
展开
-
mysql Your password does not satisfy the current policy requirements
Your password does not satisfy the current policy requirements意思就是密码不符合规则 比如密码太简单解决方法:将密码设置为复杂密码 或者修改密码规则原创 2021-09-10 20:36:15 · 226 阅读 · 0 评论 -
ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)的解决
场景:安装mysql5.7后使用xshell等远程访问工具登陆了root账户然后通过xshell等远程工具使用mysql密码(非临时密码)登陆mysql5.7,提示ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)。解决方案:此问题是因为远程工具没有对mysql的本地账户的访问权限,所以需要用户登陆服务器,按如下操作:#使用服务器而不是xshell等远程工具登陆mysql5.7(其他版本原创 2021-03-03 09:35:04 · 3361 阅读 · 0 评论 -
mysql各种神坑
1.service mysqld start [ERROR] [MY-011011] [Server] Failed to find valid data解決方法:a.查看/etc/my.cnf的datadir路径vi /etc/my.cnfb.更正datadir路径根据 Failed to find valid data directory. 修改路径b1 找出mysql文件夹#w...原创 2020-03-18 10:22:25 · 2170 阅读 · 0 评论 -
模糊查询多个字段匹配的值
1.使用正则表达式:SELECT id,name from table where name regexp “隆达|徽达”;2.使用通配符%SELECT id,name from table where name like ‘%a%’ or name like ‘%b%’;原创 2020-03-03 15:53:28 · 1499 阅读 · 0 评论 -
Mysql查询结果显示为百分比
本sql语句用到了两个函数CONCAT和CONCAT。其中CONCAT是将数值与%拼接起来。TRUNCATE(A,B)返回被舍去至小数点后B位的数字A。若B的值为0,则结果不带有小数点或不带有小数部分。可以将B设为负数,若要截去(归零)A小数点左起第B位开始后面所有低位的值.,所有数字的舍入方向都接近于零SELECT id,CONCAT(CONCAT(passScore / (danSco...原创 2019-11-28 11:25:31 · 3469 阅读 · 0 评论 -
centOs7开启防火墙3306端口(for mysql)
1.查看目前防火墙firewall-cmd --list-all 2.开放3306端口。 firewall-cmd --permanent --add-port=3306/tcp3.重启防火墙service firewalld restart4.查看3306端口是否开放 firewall-cmd --query-port=3306/tcp5.再次查看防火墙fire...原创 2019-11-27 15:38:33 · 2296 阅读 · 1 评论