zoukankan      html  css  js  c++  java
  • mysqldump-1045

    mysqldump: [Warning] Using a password on the command line interface can be insecure.
    mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect

    bakdb code

    bakdir=/data/dbbak/
    mkdir $bakdir -p
    bakfilename=`date '+%y%m%d'`.sql.gz

    dest=$bakdir/$bakfilename
    mysqldump -uroot -p xxx  | gzip > $dest
    sleep 5

    echo "qrsctl put abc123 $bakfilename $dest "
    qrsctl put abc123 $bakfilename $dest

    dbbak.sh 

    #! /usr/bin/expect

    set timeout 10
    set password  yourpassword 
    spawn ~/bakdb
    expect "Enter password:"
    send "$password "
    expect eof

    /root/dbbak.sh   >> /var/log/dbbak.log

  • 相关阅读:
    Spring Boot入门
    Spring MVC文件上传和下载
    Spring MVC异常处理
    SpringMVC
    linux(2)
    linux(1)
    白盒测试
    LoadRunner(8)
    LoadRunner(7)
    LoadRunner(6)
  • 原文地址:https://www.cnblogs.com/lavin/p/9202242.html
Copyright © 2011-2022 走看看