乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      mysql 安裝目錄及相關(guān)操作

       shangat 2010-04-11
      登錄:[mysql@localhost~]$ sudo bin/mysql --port=3306 -u root -p -S /tmp/mysql.sock

      install Doct include:                               windows
      ---------------------------------------
      目錄              目錄內(nèi)容
      -----------------------------------------
      bin             客戶端程序和mysql服務(wù)器
      data            日志文件 數(shù)據(jù)庫
      docs            文檔
      examples        示例程序和腳本
      nclude          包含頭文件
      lib             庫
      scripts         實用工具腳本
      share           錯誤消息文件
      ==========================
      安裝后將會在以下系統(tǒng)目錄產(chǎn)生文件                           linux
      ---------------------------------------
      /usr/bin                  客戶端程序和腳本
      /usr/sbin                 mysql服務(wù)器
      /var/lib/mysql            日志文件 數(shù)據(jù)庫
      /usr/share/doc/packages   文檔
      /usr/incude/mysql         包含頭文件
      /usr/lib/mysql            庫
      /usr/share/mysql          錯誤消息和字符文件
      /usr/share/sql-bench      基準程序
      --------------------------------
      =======================操作==============================
       
       
         1. 創(chuàng)建/刪除數(shù)據(jù)庫:create/drop database xxx;
         2. 創(chuàng)建/刪除表:   create/drop table  xxx [valuse ()];
         3. 添加索引等:    create index on xxx (yyy);
         4. 復制表:        create table yyy select [*,y,z ]from xxx [where gggg];  此時表的結(jié)構(gòu)類似  建立空表  在 where 中設(shè)置一個不存在的關(guān)系
                         create table like xxx;
         5. 修改表:  
             添加新字段  alter table xxx add xyz hfbi ;
             修改已存在的字段的名字和類型: alter table change  xxx yyy fdhjj;
             刪除字段: alter table xxx drop yhn;
             重命名: alter table xxx rename to yyy;   rename table xxx to yyy;
         6. 使用數(shù)據(jù):
             插入記錄:insert into xxx values ();
             更新記錄:update xxx set hgk=gjhau [where nuhgkji];
             刪除記錄:delect from xxx where jkhaurh;     當省略 where 時刪除所有記錄
             內(nèi)建函數(shù):select  sum() avg() now() from xxx [where jhak];   好像不能和字段在一塊查詢?
             別名 as 限制 limit 排序 orer by [asc  desc] 分組 group by
             使用變量: select @dfkb:=某操作結(jié)果   使用: select @dfkb; select fhu from xxx where bflb=@dfkb;
             復制記錄:insert into xxx [()] select jg,gh from yyy [where jha];
             批量數(shù)據(jù):load data local infile '/home/lvshang/....' into table xxx fields terminated by ',' lines terminated by '\n\;
             導出記錄:select gi,jghe from xxx [where fhfnk ] into outfile '/home/lvshang/yyyy' fields terminsted by ',' enclosed by
                     '"' lines terminated by '\t\n';
       
        1.修改表的相關(guān)內(nèi)容的知識
         1.1
            alter table biao1 add clomname xxx;  追加新的字段
         1.2
            alter table biao1 drop clomname;     刪除原有的字段
         1.3
            alter table biao1 change clomname clomname_new xxx ;  改編字段的相關(guān)內(nèi)容
         1.4
            alter tbale biao1 modify clomname xxxx;  只是修改字段的類型等內(nèi)容,不改變字段的名字
         1.5
            alter table biao1 rename to name_new; rename table  biao1 to name_new;    均為重命名表明
         1.6
            alter table biao1 alter clomname set default xx/drop default   為一個字段設(shè)置或刪除默認值xx (數(shù)字),不常用
         1.7
            alter ignore table biao1 change clomname xxx unique;  將表的clomname 字段設(shè)置為不允許重復的出現(xiàn)。注意前面的 IGNORE
         1.8
            alter table biao1 type= xxx;  將表的類型改為 xxx .
         1.9
            alter table biao1 add fulltext index xxx; alter table biao1 drop index xxx;  增加/刪除索引
       
       2. 批量添加本地文件:
         load data local infile '/usr/lvshang/biaox' into table biaoy fields terminated by ',' lines terminated by '\n';
        

        本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
        轉(zhuǎn)藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多