首页 > 日记 > Magento 2.0: 数据库配置文件位置,数据库搬家Location of Database Configuration File
2016
04-11

Magento 2.0: 数据库配置文件位置,数据库搬家Location of Database Configuration File

In Magento 1.0, the configuration file that contains database settings and other information is located here:
/app/etc/local.xml

In Magento 2.0, the configuration is in the same directory (/app/etc/) but has been renamed to env.php. The file path is:

magento 2 数据库配置文件位置/app/etc/env.php

In this file, a number of key things are set, including the database connection information:

‘host’ => ‘localhost’,
‘dbname’ => ‘magento2database’,
‘username’ => ‘some-sample-username’,
‘password’ => ‘Extremely-Complicated-Password-12345’,
‘model’ => ‘mysql4’,
‘engine’ => ‘innodb’,
‘initStatements’ => ‘SET NAMES utf8;’,
‘active’ => ‘1’,

最后编辑:
作者:ning
这个作者貌似有点懒,什么都没有留下。