mysql ignore 1 lines_MYSQL使用笔记(1)
創建用戶 用戶名 dnsexpuser 密碼:dnsexp1347
insert into mysql.user(Host,User,Password) values ('localhost','dnsexpuser',password('dnsexp1347')) ;
創建數據庫
分配數據庫權限
create database wap_tagdb ;
grant all privileges on wap_tagdb.*to waptag@localhost identified by '123123' ;
增加表字段 alter table 表名 add 字段 類型
alter table wap_host_old add flag int(2) not null default 0 ;
刪除表中字段
alter table wap_host_old drop column flag
從文件里導入數據
load data infile '/tmp/tt.txt' into table wap_subtag fields terminated by '/t' enclosed by '' lines terminated by '/n' IGNORE 1 LINES (subtag_id,subtag_name);
查詢導出到文件里
select host,sys_toptag,sys_subtag,new_toptag,new_subtag,date_format(FROM_UNIXTIME(modtime),'%Y-%m-%d') into outfile '/tmp/log20110105.txt' fields terminated by '/t' optionally enclosed by '' lines terminated by '/n' from wap_log ;
分享到:
2011-01-05 18:04
瀏覽 477
評論
總結
以上是生活随笔為你收集整理的mysql ignore 1 lines_MYSQL使用笔记(1)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: idea样式报错_来自强迫症患者的IDE
- 下一篇: mysql密码高级_mysql高级操作