1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時(shí)間:8:30-17:00
      你可能遇到了下面的問(wèn)題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
      mysql日常檢查

      1)   進(jìn)入MySQL終端

      # mysql -uroot -p

      成都創(chuàng)新互聯(lián)公司堅(jiān)信:善待客戶,將會(huì)成為終身客戶。我們能堅(jiān)持多年,是因?yàn)槲覀円恢笨芍档眯刨嚒N覀儚牟缓鲇瞥踉L客戶,我們用心做好本職工作,不忘初心,方得始終。10余年網(wǎng)站建設(shè)經(jīng)驗(yàn)成都創(chuàng)新互聯(lián)公司是成都老牌網(wǎng)站營(yíng)銷服務(wù)商,為您提供成都網(wǎng)站設(shè)計(jì)、做網(wǎng)站、成都外貿(mào)網(wǎng)站建設(shè)公司、網(wǎng)站設(shè)計(jì)、H5場(chǎng)景定制、網(wǎng)站制作、品牌網(wǎng)站建設(shè)小程序設(shè)計(jì)服務(wù),給眾多知名企業(yè)提供過(guò)好品質(zhì)的建站服務(wù)。

      2)   查看版本

      # mysqladmin -uroot -p version

      select @@version;

      3)   列出數(shù)據(jù)庫(kù)

      show databases;

      4)   顯示哪些線程正在運(yùn)行

      show processlist

      5)   查看配置

      # cat /etc/my.cnf

      6)   查看引擎

      >show engines;

      默認(rèn)的引擎

      show variables like '%storage_engine%';

      7)   查詢?nèi)罩?/font>

      show variables like 'log_%';

      # cat /etc/my.cnf |grep log

      log-bin=mysql-bin

      binlog_format=mixed

      log-error=/var/log/mysqld.log

      # tail -n 20 /var/log/mysqld.log

       

      8)   查看所有庫(kù)大小

       select concat(round(sum(DATA_LENGTH/1024/1024)+sum(INDEX_LENGTH/1024/1024), 2), 'MB') as data from information_schema.tables

      所有庫(kù)大小

      select TABLE_SCHEMA,concat(truncate(sum(data_length)/1024/1024,2),' MB')as data_size,concat(truncate(sum(index_length)/1024/1024,2),'MB')as index_sizefrom information_schema.tables group by TABLE_SCHEMAorder by data_lengthdesc;

      指定庫(kù)所有表大小

      select TABLE_NAME, concat(truncate(data_length/1024,2),' KB') as data_size, concat(truncate(index_length/1024,2),' KB') as index_size from information_schema.tables where TABLE_SCHEMA = 'mysql' group by TABLE_NAME order by data_length desc;

      9)   查詢表鎖統(tǒng)計(jì)

      show status like 'table%';

      如果waited數(shù)值較高,說(shuō)明鎖爭(zhēng)用較嚴(yán)重

      10)         檢查鍵效率

      show status like 'key_read%';

      key_reads/key_read_requests 盡可能低,至少是1:100,最好是1:1000

      11)         檢查請(qǐng)求緩存命中

      show status like 'Qcache%';

      Qcache_lowmem_prunes值非常大,說(shuō)明緩沖不夠

      Qcache_hits非常大,說(shuō)明查詢緩沖使用非常頻繁,需增大緩沖

      12)         判斷是否主從

      show global status like 'Slave_running'; 

      13)         臨時(shí)表

      show status like '%tmp%';

      正常created_tmp_disk_tables/created_tmp_tables*100%<=25%

       


      本文標(biāo)題:mysql日常檢查
      分享路徑:http://www.ef60e0e.cn/article/pcepse.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
        1. <ul id="0c1fb"></ul>

          <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
          <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

          仁布县| 石景山区| 中江县| 灌南县| 东阳市| 无为县| 七台河市| 永吉县| 怀宁县| 台南市| 水城县| 麻栗坡县| 临西县| 运城市| 宁津县| 石嘴山市| 湄潭县| 耿马| 龙胜| 微山县| 临颍县| 通化市| 老河口市| 邯郸市| 肥乡县| 柞水县| 新竹县| 丁青县| 通城县| 阜平县| 宁波市| 阳春市| 宁德市| 崇文区| 马边| 鹿邑县| 虹口区| 东港市| 东源县| 海丰县| 黄浦区|