近日有一客户服务器想安装M2,但是整体数据库MYSQL版本为5.5.X,完全不符合安装条件。让我们想办法处理~
只到钱到位,一切都好办!!开搞
1。setup/src下有安装版本验证
setup/src/Magento/Setup/Controller/DatebaseCheck.php
中的indexAction需要修改为
public function indexAction() { return new JsonModel(['success' => true]); }
2。
setup/src/Magento/Setup/Validator/DbValidator.php
中的大约98行修改为
public function checkDatabaseConnection($dbName, $dbHost, $dbUser, $dbPass = '') { // establish connection to information_schema view to retrieve information about user and table privileges $connection = $this->connectionFactory->create([ ConfigOptionsListConstants::KEY_NAME => 'information_schema', ConfigOptionsListConstants::KEY_HOST => $dbHost, ConfigOptionsListConstants::KEY_USER => $dbUser, ConfigOptionsListConstants::KEY_PASSWORD => $dbPass, ConfigOptionsListConstants::KEY_ACTIVE => true, ]); return $this->checkDatabaseName($connection, $dbName) && $this->checkDatabasePrivileges($connection, $dbName); }
为防止出现 提示
sorry,but we support MYSQL version 5.6.0 or later.
这些都是必须的,从其它正常安装的同版本中,得到一数据库,这里数据库有意思了