steveorevo/mysql2json

MySQL2JSON是一个支持序列化PHP的数据库到JSON导出工具。

2.1.3 2022-05-17 06:50 UTC

This package is not auto-updated.

Last update: 2024-09-25 08:06:29 UTC


README

支持PHP序列化的数据库到JSON对象转换工具。

关于

这个命令行工具会将指定的数据库导出为“格式化输出”的JSON对象。自动检测PHP序列化字符串也将被转换为JSON对象。此工具允许以简单行表示MySQL数据库,非常适合在基于文本的比较工具中查看内容。可以使用配套工具json2mysql进行重新导入。

帮助

输入 mysql2json --help

MySQL2JSON is a database to JSON export tool with support for serialized PHP.
Version 2.1.3

Usage: mysql2json [-x, --exclude] [-?, --help] [-h host, --hose host (default: localhost)] [-l, --list] [-o output, --output output] [-p password, --password password] [-P port, --port port] [-q, --quiet] [-t tables, --tables tables] [-u user, --user user (default: root)] [-v, --version] [database]

Optional Arguments:
        -?, --help
                print this help
        -h host, --hose host (default: localhost)
                host name or IP address (default: localhost)
        -l, --list
                list databases & tables available for export
        -x, --exclude
                excludes rows with _transient_ in option_name column (WordPress)
        -o output, --output output
                path & file (default is db name in current folder)
        -p password, --password password
                password to connect with (default is none)
        -P port, --port port
                the TCP/IP port number to connect to
        -t tables, --tables tables
                a comma delimited list of tables (default empty for all)
        -u user, --user user (default: root)
                username to connect as (default: root)
        -q, --quiet
                quiet (no output)
        -v, --version
                output version number
        database
                the database to export