Code Monkey home page Code Monkey logo

mysqldumpshell's Introduction

dump2csv.sh

这个脚本旨在自动校验mysql实例的参数和需要导出的数据数量后,导出数据。

校验的参数:

  • GTID是否开启 在没有开启的情况下,不会加--set-gtid-purged=off

  • binlog是否开启 在没有开启的情况下,不会加--master-data=2

Usage

./dump2sql.sh [options] -s socket -u root -f file -D db -T table

Options

-u|--user Database user name

-S|--socket Database socket

-h|--host Database host

-P|--port Database port

-D|--databaes Database name

-T|--table Database table name

-f|--file output file and its full path

-g|--gzip gzip the output file


dump2csv.sh

这个脚本旨在没有secure-file-priv权限的时候,用mysql -e导出数据,并处理为csv。

Usage

./dump2csv.sh [options] -s socket -u root -f file -D db -T table

Options

-u|--user Database user name

-S|--socket Database socket

-h|--host Database host

-P|--port Database port

-D|--databaes Database name

-T|--table Database table name

-f|--file output file and its full path

--sql query sql

mysqldumpshell's People

Contributors

sisyphussq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.