Skip to content

Commit 450ee74

Browse files
committed
Add MariaDB to databases config and Change MySQL 8 collation
1 parent f99a90f commit 450ee74

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

config/database.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,26 @@
3939
],
4040

4141
'mysql' => [
42+
'driver' => 'mysql',
43+
'url' => env('DB_URL'),
44+
'host' => env('DB_HOST', '127.0.0.1'),
45+
'port' => env('DB_PORT', '3306'),
46+
'database' => env('DB_DATABASE', 'forge'),
47+
'username' => env('DB_USERNAME', 'forge'),
48+
'password' => env('DB_PASSWORD', ''),
49+
'unix_socket' => env('DB_SOCKET', ''),
50+
'charset' => 'utf8mb4',
51+
'collation' => 'utf8mb4_0900_ai_ci',
52+
'prefix' => '',
53+
'prefix_indexes' => true,
54+
'strict' => true,
55+
'engine' => null,
56+
'options' => extension_loaded('pdo_mysql') ? array_filter([
57+
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
58+
]) : [],
59+
],
60+
61+
'mariadb' => [
4262
'driver' => 'mysql',
4363
'url' => env('DB_URL'),
4464
'host' => env('DB_HOST', '127.0.0.1'),

0 commit comments

Comments
 (0)