激情五月天婷婷,亚洲愉拍一区二区三区,日韩视频一区,a√天堂中文官网8

<ul id="buwfs"><strike id="buwfs"><strong id="buwfs"></strong></strike></ul>
    <output id="buwfs"></output>
  • <dfn id="buwfs"><source id="buwfs"></source></dfn>
      <dfn id="buwfs"><td id="buwfs"></td></dfn>
      <div id="buwfs"><small id="buwfs"></small></div>
      <dfn id="buwfs"><source id="buwfs"></source></dfn>
      1. <dfn id="buwfs"><td id="buwfs"></td></dfn>
        始創(chuàng)于2000年 股票代碼:831685
        咨詢熱線:0371-60135900 注冊(cè)有禮 登錄
        • 掛牌上市企業(yè)
        • 60秒人工響應(yīng)
        • 99.99%連通率
        • 7*24h人工
        • 故障100倍補(bǔ)償
        全部產(chǎn)品
        您的位置: 網(wǎng)站首頁(yè) > 幫助中心>文章內(nèi)容

        MYSQL數(shù)據(jù)庫(kù)常用命令

        發(fā)布時(shí)間:  2012/5/26 20:24:41
        MYSQL常用命令列表

          1、系統(tǒng)管理

          mysql -h主機(jī)地址 -u用戶名 -p

          連接MYSQL(在mysql/bin)

          exit

          退出MYSQL命令

          mysqladmin -u用戶名 -p舊密碼 password新密碼

          修改密碼(在mysql/bin)

          grantselect[insert][,update][,delete]on數(shù)據(jù)庫(kù).*to用戶名@localhost("%", 表示任何主機(jī))identifiedby "密碼"

          增加用戶

          mysqldump –u root –p ­­opt數(shù)據(jù)庫(kù)名>備份文件名

          備份數(shù)據(jù)庫(kù)(在mysql/bin)

          mysql –u root –p < batch­file (例如備份文件名)

          使用批處理

          mysql.server start

          啟動(dòng)服務(wù)器

          mysql.server stop

          停止服務(wù)器

          msql.server­­log

          2、查詢命令

          select version()

          查詢版本號(hào)

          select current_date

          查詢當(dāng)前日期

          3、顯示命令

          show databases

          顯示數(shù)據(jù)庫(kù)列表

          show tables 顯示庫(kù)中的數(shù)據(jù)表

          describe 表名 顯示數(shù)據(jù)表的結(jié)構(gòu)

          select * from 表名 顯示表中的記錄

          select what_to_select from which table [whereconditions_to_satisfy and (or) where conditions_to_satisfy] 從一個(gè)表中檢索數(shù)據(jù)『滿足條件』

          select 字段1,字段2,… from 表名 顯示特定列的值

          select * from 表名 order by 字段名 排序行

          select 字段1,包含字段2的運(yùn)算式as 新字段 from 表名 字段值運(yùn)算操作

          select 字段1 is null(is not null) 空值操作

          Select*from表名where字段名like(not like) “ 字符”

          注: 允許使用“_”匹配任何單個(gè)字符, 而“%” 匹配任意數(shù)目字符 模式匹配

          Select * from表名where字段名regexp(not regexp)或者rlike(not rlike) “.”匹配任何單個(gè)的字符 一個(gè)字符類[…]匹配方框內(nèi)任何字符。例如[a],[asd],[az] 匹配任何小寫字母,[09] 匹配任何數(shù)

          字。 “*”匹配零個(gè)或者多個(gè)在它前面的東西。 正則表達(dá)式區(qū)分大小寫[aA] 。 如果它出現(xiàn)在被測(cè)試值的任何地方,模式都匹配。 定位,在模式開始處用“^”,結(jié)尾處用“$”,例如“^b”

          擴(kuò)展正則表達(dá)式

          Select count(*) from 表名

          Select 字段名,count(*) from 表名 group by 字段名 行計(jì)數(shù)

          4、編輯命令

          use database 庫(kù)名

          使用的數(shù)據(jù)庫(kù)

          create database 庫(kù)名

          創(chuàng)建數(shù)據(jù)庫(kù)

          create table 表名

          在數(shù)據(jù)庫(kù)中創(chuàng)建表

          insert into表名values (“data”,”data”)

          向表中添加記錄

          Load data infile “/path/filename” intotable 表名

          從文件中向表添加數(shù)據(jù), 文件每行包括一條記錄, 用定位符(tab) 把值分開。

          drop database 庫(kù)名

          刪除數(shù)據(jù)庫(kù)

          drop table 表名

          刪除數(shù)據(jù)庫(kù)中的表

          delete from表名where

          刪除數(shù)據(jù)庫(kù)表中的記錄

          Update表名set字段=”值” wherewhereconditions_to_satisfy

          更新數(shù)據(jù)庫(kù)表中記錄的值
        本文出自:億恩科技【mszdt.com】

        服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]

      2. 您可能在找
      3. 億恩北京公司:
      4. 經(jīng)營(yíng)性ICP/ISP證:京B2-20150015
      5. 億恩鄭州公司:
      6. 經(jīng)營(yíng)性ICP/ISP/IDC證:豫B1.B2-20060070
      7. 億恩南昌公司:
      8. 經(jīng)營(yíng)性ICP/ISP證:贛B2-20080012
      9. 服務(wù)器/云主機(jī) 24小時(shí)售后服務(wù)電話:0371-60135900
      10. 虛擬主機(jī)/智能建站 24小時(shí)售后服務(wù)電話:0371-60135900
      11. 專注服務(wù)器托管17年
        掃掃關(guān)注-微信公眾號(hào)
        0371-60135900
        Copyright© 1999-2019 ENKJ All Rights Reserved 億恩科技 版權(quán)所有  地址:鄭州市高新區(qū)翠竹街1號(hào)總部企業(yè)基地億恩大廈  法律顧問(wèn):河南亞太人律師事務(wù)所郝建鋒、杜慧月律師   京公網(wǎng)安備41019702002023號(hào)
          0
         
         
         
         

        0371-60135900
        7*24小時(shí)客服服務(wù)熱線