mysql
文章平均质量分 82
ayupch
记录点滴,分享知识,共同进步!
展开
-
一文弄清:mysql自增表插入数据时,Id不连续问题
今天查看数据库时,发现id设置了auto_increment,但是,数据库中id是不连续。正好趁着这个机会总结一下mysql常用的插入语句(insert into、insert ignore into、insert into … on duplicate key update)原创 2021-09-29 01:04:21 · 6164 阅读 · 0 评论 -
mysql日常使用经验积累
注意事项:字段名不要使用desc,desc是mysql的关键字。1、desc tablename用来获取表的数据结构;2、desc在order by中代表倒叙,例如: select * from table order by id desc(asc)原创 2020-11-06 01:49:14 · 120 阅读 · 0 评论 -
window环境下:使用ip地址无法连接mysql问题解决
mysql 默认只允许使用localhost或者127.0.0.1访问的,如果想用ip地址,来访问mysql,需要手动开启这个权限。进入命令行执行下面的命令即可grant all privileges on *.* to '用户名'@'IP地址' identified by '密码';flush privileges;如果对所有ip开放grant all privileges on *.* to 'root'@'%' identified by '111111';flush privilege原创 2020-08-14 22:17:03 · 1925 阅读 · 0 评论