专栏首页cwl_Java快速学习-Linux操作MySQL指令集合

快速学习-Linux操作MySQL指令集合

    1  ifconfig
    2  vi /etc/sysconfig/network-scripts/ifcfg-eth0 
    3  vi
    4  vi /etc/udev/rules.d/70-persistent-net.rules 
    5  reboot
    6  ifconfig
    7  vi /etc/sysconfig/network-scripts/ifcfg-eth0 
    8  reboot
    9  ifconfig
   10  service iptables stop
   11  chkconfig iptables off
   12  reboot
   13  ifconfig
   14  vi /etc/my.cnf
   15  service mysqld restart
   16  mysql -uroot -p
   17  ll
   18  mkdir sakila
   19  ll
   20  cd sakila/
   21  rz
   22  yum install lrzsz
   23  rz
   24  ll
   25  pwd
   26  ll
   27  cd ..
   28  ll
   29  pwd
   30  mkdir data
   31  cd data/
   32  pwd
   33  mkdir /usr/local/data
   34  pwd
   35  cd /usr/local/data
   36  ll
   37  pwd
   38  vi /etc/my.cnf
   39  tail -50f /var/lib/mysql/mysql-host-slow.log 
   40   mysqldumpslow -h
   41   mysqldumpslow -v
   42   mysqldumpslow -h
   43   mysqldumpslow -t 10
   44   mysqldumpslow -t 10 /var/lib/mysql/mysql-host-slow.log
   45   mysqldumpslow -h
   46   mysqldumpslow -v
   47   mysqldumpslow -t 10 /var/lib/mysql/mysql-host-slow.log
   48  pt-query-digest -h
   49  yum install perl-DBI
   50  yum install perl-DBD-MySQL
   51  yum install perl-Time-HiRes
   52  yum install perl-IO-Socket-SSL
   53  wget http://pkgs.repoforge.org/perl-TermReadKey/perl-TermReadKey-2.30-1.el3.rf.x86_64.rpm
   54  wget https://www.percona.com/downloads/percona-toolkit/2.2.14/RPM/percona-toolkit-2.2.14-1.noarch.rpm
   55  rpm -ivh percona-toolkit-2.2.14-1.noarch.rpm
   56  wget https://www.percona.com/downloads/percona-toolkit/2.2.16/RPM/percona-toolkit-2.2.16-1.noarch.rpm && yum localinstall -y  percona-toolkit-2.2.16-1.noarch.rpm
   57  /usr/local/bin/pt-query-digest   /var/lib/mysql/mysql-host-slow.log
   58  pt-summary
   59  pt-diskstats
   60  pt-mysql-summary --user=root --password=admin
   61  pt-query-digest  /var/lib/mysql/mysql-host-slow.log
   62  yum list installed | grep mysql
   63  yum -y remove mysql-libs.x86_64
   64  wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
   65  yum install wget
   66  wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
   67  rpm -ivh mysql-community-release-el6-5.noarch.rpm
   68  yum repolist all | grep mysql
   69  yum install mysql-community-server -y
   70  chkconfig --list | grep mysqld
   71  chkconfig mysqld on
   72  chkconfig --list | grep mysqld
   73  service mysqld start
   74  mysql_secure_installation
   75  mysql -uroot -p 
   76  mysql -uroot -p yes
   77  mysql_secure_installation
   78  mysql -uroot -p 
   79  hatlt
   80  halt;
   81  netstat -nltp
   82  mysql -uroot -p
   83  wget https://www.percona.com/downloads/Percona-XtraDB-Cluster-56/Percona-XtraDB-Cluster-5.6.39-26.25/binary/tarball/Percona-XtraDB-Cluster-5.6.39-rel83.1-26.25.1.Linux.x86_64.ssl101.tar.gz
   84  ll
   85  tar -zxvf Percona-XtraDB-Cluster-5.6.39-rel83.1-26.25.1.Linux.x86_64.ssl101.tar.gz
   86  ll
   87  mv Percona-XtraDB-Cluster-5.6.39-rel83.1-26.25.1.Linux.x86_64.ssl101 pt-tools
   88  ll
   89  cd pt-tools/
   90  ll
   91  cd bin/
   92  ll
   93  cd ..
   94  ll
   95  cd sql-bench
   96  ll
   97  cd ..
   98  ll
   99  cd mysql-test/
  100  ll
  101  cd ..
  102  pt-query-digest --help
  103  pt-table-checksum --help
  104  pt-duplicate-key-checker --help
  105  pt-duplicate-key-checker -uroot -padmin -h 127.0.0.1
  106  cd ~
  107  pt-duplicate-key-checker -uroot -padmin -h 127.0.0.1
  108  pt-index-usage -uroot -padmin slow_query_log
  109  pt-index-usage -uroot -padmin /var/lib/mysql/mysql-host-slow.log
  110  /var/lib/mysql/mysql-host-slow.log
  111  pt-index-usage -uroot -padmin /var/lib/mysql/mysql-host-slow.log
  112  halt
  113  vi /etc/sysctl.conf 
  114  vi /etc/security/limits.conf 
  115  pt-index-usage -uroot -padmin /var/lib/mysql/mysql-host-slow.log
  116  /usr/sbin/mysqld --verbose --help | grep -A 1 'default options'
  117  mysql -uroot -p
  118  halt
  119  vi pet.txt
  120  ll
  121  pwd
  122  vi pet.txt 
  123  mysqldump
  124  mysqldump -uroot -p anlimal pet >pet.txt 
  125  ll
  126  more aa.txt 
  127  history

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • 快速学习-Linux安装MySQL

    yum install mysql mysql-server mysql-devel

    cwl_java
  • Docker应用部署

    -e 代表添加环境变量 MYSQL_ROOT_PASSWORD 是root用户的登陆密码

    cwl_java
  • 性能优化-MySQL慢查日志分析工具(pt-query-digest)

    性能的管理一直都是摆在第一位的,dba的很多工作管理层都看不到也没有办法衡量价值,但是如果一个系统慢的跟蜗牛一样,dba通过监控调优把系统从崩溃边 缘重新拉回到...

    cwl_java
  • 1 mysql底层解析——连接层,包括连接、解析、缓存、引擎、存储等

    很多时候,程序员对mysql处于频繁使用,但都一知半解的程度,除了会加个索引,貌似也没啥优化的技能了。事实上,mysql能有今日的成就,必然不是靠个索引就吃饭的...

    天涯泪小武
  • 公司没有 DBA,Mysql 运维自己来

    官方下载地址:https://dev.mysql.com/downloads/repo/yum/

    静默虚空
  • Centos7下【掌握】安装mysql5.7

    1,下载,下载那个都可以 https://dev.mysql.com/downloads/mysql/5.7.html#downloads

    Little JAVA
  • Liunx centos7-下安装Mysql笔记

    Little JAVA
  • centos下完全卸载mysql

    1、yum remove mysql mysql-server mysql-libs compat-mysql51

    似水的流年
  • linux下彻底卸载mysql 图解教程

    http://blog.itblood.com/completely-uninstall-the-mysql-under-linux-graphic-tutor...

    用户5875349
  • Docker Compose Mysql

    新建目录后,将你需要的mysql配置文件 mymysqld.cnf 放到conf目录里:

    李郑

扫码关注云+社区

领取腾讯云代金券