반응형
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
반응형
'itsource' 카테고리의 다른 글
JavaScript 배열을 선언할 때 "Array()"와 "[]"의 차이점은 무엇입니까? (0) | 2023.01.08 |
---|---|
joomla 1.5 mariadb 10 (0) | 2023.01.08 |
Python의 time.clock()과 time.time()의 정확도는? (0) | 2023.01.08 |
PHP의 startsWith() 및 endsWith() 함수 (0) | 2023.01.08 |
Python에서 MySQL 데이터베이스에 연결하는 방법은 무엇입니까? (0) | 2023.01.08 |