Mysql
Fantasy_IT
记录程序生活的点点滴滴!
展开
-
不同网段访问本地mysql服务器
1.打开本地mysql client,并输入密码登陆本地mysql服务器;2.输入命令:GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;(注:其中的root是用户名,123456是密码),回车。3.输入命令:flush privileges;回车。...原创 2018-10-24 09:45:07 · 1902 阅读 · 0 评论 -
Mysql 实用sql语句(一)
(1)如果有,则删除后再insert;如果没有,直接insert。REPLACE INTO students (id, class_id, name, gender, score) VALUES (1, 1, '小明', 'F', 99);若id=1的记录不存在,REPLACE语句将插入新记录,否则,当前id=1的记录将被删除,然后再插入新记录。(2)如果有,就update;如果没有...原创 2019-01-29 11:16:36 · 183 阅读 · 0 评论