pxlrbt/deployer-mysql 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pxlrbt/deployer-mysql

Composer 安装命令:

composer require pxlrbt/deployer-mysql

包简介

Unoffical Deployer recipe containing MySQL tasks.

README 文档

README

An unofficial Deployer recipe containing a set of useful tasks for interacting with MySQL.

Installation

Install via Composer as a dev dependency to your project.

$ composer require --dev pxlrbt/deployer-mysql

Configuration

For configuring MySQL connection, add the following to your deployer config:

require __DIR__ . '/vendor/pxlrbt/deployer-mysql/recipe/mysql.php';

set('mysql.connection', [
  'host' => 'localhost',
  'port' => 3306,
  'database' => 'your_database_name',
  'username' => 'root',
  'password' => 'root',
]);

You can modify the dump file and mysqldump options via:

set('mysql.dump', [
  'file' => 'dump.sql',
  'options' => [
      '--skip-comments'
  ]
]);

Each option you want to add must be a new entry in the array.

Note: the --skip-comments option is the only default option set. So, if you don't have any other options for your setup, you can omit this configuration key entirely.

Autoloading database credentials

Instead of providing your database credentials inside the deployer config, it's better to load them from an existing config (e.g. .env file).

Laravel

There is a recipe that autoloads the credentials from Laravels .env file. Just add the recipe to your deployer file and your ready to go-

require __DIR__ . '/vendor/pxlrbt/deployer-mysql/recipe/laravel.php';

统计信息

  • 总下载量: 181
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固