kodeops/laravel-mysql-dumper
Composer 安装命令:
composer require kodeops/laravel-mysql-dumper
包简介
Dump and restore the contents of a MySQL database
README 文档
README
_ _ _____ ______ _______ _____ _____ _______
|____/ | | | \ |______ | | |_____] |______
| \_ |_____| |_____/ |______ |_____| | ______|
kodeops/laravel-mysql-dumper
Dump and restore the contents of a MySQL database.
Install
Add composer dependency
composer require kodeops/laravel-mysql-dumper
Add database connection settings to the environment file
The SOURCE prefix indicates the database settings where the dump will be generated from:
MYSQL_DUMPER_DESTINATION_HOST=
MYSQL_DUMPER_DESTINATION_PORT=
MYSQL_DUMPER_DESTINATION_DATABASE=
MYSQL_DUMPER_DESTINATION_USERNAME=
MYSQL_DUMPER_DESTINATION_PASSWORD=
The DESTINATION prefix indicates the database settings where the dump will be imported:
MYSQL_DUMPER_SOURCE_HOST=
MYSQL_DUMPER_SOURCE_PORT=
MYSQL_DUMPER_SOURCE_DATABASE=
MYSQL_DUMPER_SOURCE_USERNAME=
MYSQL_DUMPER_SOURCE_PASSWORD=
Example:
MYSQL_DUMPER_DESTINATION_HOST=127.0.0.1
MYSQL_DUMPER_DESTINATION_PORT=3306
MYSQL_DUMPER_DESTINATION_DATABASE=destination-database
MYSQL_DUMPER_DESTINATION_USERNAME=root
MYSQL_DUMPER_DESTINATION_PASSWORD=secret
MYSQL_DUMPER_SOURCE_HOST=127.0.0.1
MYSQL_DUMPER_SOURCE_PORT=3306
MYSQL_DUMPER_SOURCE_DATABASE=source-database
MYSQL_DUMPER_SOURCE_USERNAME=root
MYSQL_DUMPER_SOURCE_PASSWORD=secret
Using the command line
Cloning the source database to the destination database
php artisan mysql-dumper:clone
Exporting the source database to a file
php artisan mysql-dumper:export
Importing a dump file to the destination database
php artisan mysql-dumper:import /home/vagrant/app/storage/laravel-mysql-dumper/test.sql
Production safe
The command is not available in production environments unless you add the --force option:
php artisan mysql-dumper:clone
Dump storage
All dumps are located in the laraval storage path in laravel-mysql-dumper folder:
/home/vagrant/app/storage/laravel-mysql-dumper
kodeops/laravel-mysql-dumper 适用场景与选型建议
kodeops/laravel-mysql-dumper 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.09k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 07 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「dump」 「mysql」 「laravel」 「kodeops」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kodeops/laravel-mysql-dumper 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kodeops/laravel-mysql-dumper 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kodeops/laravel-mysql-dumper 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This package will add the `dd` and `dump` helpers to your Phalcon application.
Dibi is Database Abstraction Library for PHP
Simple Twig extension improving templates debugging
nice output for debug functions for PHP 5.3
Laravel SQL Queries Dumper
PHP module for MySql database
统计信息
- 总下载量: 5.09k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 27
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-07-02