ant0x64 / magento-slave-sql
N/A
1.0.0
2024-07-03 18:55 UTC
Requires
- php: ~8.1.0||~8.2.0
- magento/framework: ^102.0.0
This package is auto-updated.
Last update: 2024-09-04 08:40:10 UTC
README
概述
此Magento 2模块通过允许在Magento应用中针对专用二级数据库连接执行SELECT查询,增强了数据库管理功能。
安装
先决条件
- 已安装并配置了Magento 2.x。
- 已全局安装Composer。
安装
composer require ant0x64/magento-slave-sql bin/magento module:enable Ant0x64_SlaveSql
配置
为了使用模块功能,您需要在Magento的env.php配置文件中配置二级数据库连接,名为slave
'db' => [ 'connection' => [ 'slave' => [ 'host' => 'slave_host', 'dbname' => 'slave_db', 'username' => 'db_username', 'password' => 'db_password', 'active' => '1', ], ], ],