my magento2 is reading mariadb server and database is connected to that, I am trying o use mysql instead but I had no luck, it does not recognize the database at all although I have added the following:
'db' => [
'connection' => [
'indexer' => [
'host' => 'localhost',
'dbname' => 'm2',
'username' => 'user',
'password' => 'xxx',
'model' => 'mysql4',
'engine' => 'innodb',
'active' => '1',
'persistent' => NULL
],
'default' => [
'host' => 'localhost',
'dbname' => 'm2',
'username' => 'user',
'password' => 'xxx',
'model' => 'mysql4',
'engine' => 'innodb',
'active' => '1'
]
],
'table_prefix' => ''
I also tried using a new user name and password for only mysql to make it understand to read from there but still it is connecting to mariadb instead.
How can I switch it to mysql? my mysql version is 5.7.28 and my magento version is 2.3.1
In Abstract.php line 128:
SQLSTATE[HY000] [1049] Unknown database 'm2'
how can I switch so it understands to read from mysql server instead of mariadb?
Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Framework\Setup\De
claration\Schema\Db\SchemaBuilder::processReferenceKeys() must be of the type ar
ray, null given, called in C:\wamp64\www\scosche-industries\vendor\magento\frame
work\Setup\Declaration\Schema\Db\SchemaBuilder.php on line 127 and defined in C:
\wamp64\www\scosche-industries\vendor\magento\framework\Setup\Declaration\Schema
\Db\SchemaBuilder.php:137
Stack trace:
#0 C:\wamp64\www\scosche-industries\vendor\magento\framework\Setup\Declaration\S
chema\Db\SchemaBuilder.php(127): Magento\Framework\Setup\Declaration\Schema\Db\S
chemaBuilder->processReferenceKeys(NULL, Object(Magento\Framework\Setup\Declarat
ion\Schema\Dto\Schema))
#1 C:\wamp64\www\scosche-industries\vendor\magento\framework\Setup\Declaration\S
chema\SchemaConfig.php(66): Magento\Framework\Setup\Declaration\Schema\Db\Schema
Builder->build(Object(Magento\Framework\Setup\Declaration\Schema\Dto\Schema))
#2 C:\wamp64\www\scosche-industries\vendor\magento\framework\Setup\Declaration\S
chema\UpToDateDe in C:\wamp64\www\scosche-industries\vendor\magento\framework\Se
tup\Declaration\Schema\Db\SchemaBuilder.php on line 137