数据库
心存阳光灬
。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
xx.xx.xx.xx(ip)is not allowed to connect to this mysql server
问题1.mysql -u root -p 登录到mysql中,输入密码2.use mysql;3.select host from user where user='root';4.修改帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%"update user set host = '%' where u..原创 2021-01-23 16:08:13 · 304 阅读 · 4 评论 -
关于Linux mysql密码的问题
解决mysql不需要密码就可以登陆问题1.use mysql;2.update user set authentication_string=password("你的密码") where user='root'; #(无password字段的版本,也就是版本3.update user set password=password('你的密码') where user='root'; #(有password字段的版本,版本>5.7的)4.update user set plugin="my原创 2021-01-23 16:01:58 · 171 阅读 · 0 评论 -
工程师不能不知道的30个SQL优化方案!!!
1. 对查询进行优化,要尽量避免全表扫描,首先考虑在 where 及 order by 涉及的列上建立索引。2. 应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描3. 尽量建表时使用不为null操作4. 应尽量避免在 where 子句中使用 != 或 <> 操作符,否则将引擎放弃使用索引而进行全表扫描。5. 应尽量避免在 w...原创 2020-03-23 09:45:27 · 1879 阅读 · 3 评论
分享