itsource

Maria DB를 사용한 Larabel 6.x 마이그레이션 실패

mycopycode 2023. 1. 8. 14:39
반응형

Maria DB를 사용한 Larabel 6.x 마이그레이션 실패

원래 MySQL에서 작동하는 프로젝트를 가지고 있었습니다(중요하다면 5.7.25x64).이제 이 프로젝트를 다른 서버에 도입해야 합니다.MariaDB(10.4.11-MariaDB)는 다음 후composer install괴로운php artisan migrate하지만 예외는 있다

Illuminate\Database\QueryException  : SQLSTATE[HY000] [2006] MySQL server has gone away (SQL: select * from information_schema.tables where table_schema = admin_testtable and table_name = migrations and table_type = 'BASE TABLE')

레벨 6.10.1
MariaDB 10.4.11
PHP 7.3.13
센토스8
.env

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=admin_testtable  //(i can't remove 'admin_' in name. the DB is created and exists)
DB_USERNAME=username
DB_PASSWORD=password

php artisan optimize:clear, php artisan config:cache, composer dump-autoload서버 재시작 - 도움이 되지 않습니다(만일의 경우).

my.cnf 파일 편집

max_allowed_packet=64M // set 128M if required

Windows 의 경우, 이 파일은 다음의 장소에 있습니다.\ProgramData\MySQL\MySQL Server 5.6인치

Linux(Ubuntu): /etc/mysql

편집 후 mysql 서비스를 새로고침합니다.

언급URL : https://stackoverflow.com/questions/59665236/laravel-6-x-migration-failed-with-maria-db

반응형