Azure-Samples / Azure-Samples/laravel-tasks

Not Compatible with MySQL 8.0

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
67
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

See discussion here: https://github.com/laravel/framework/pull/23948 . The provided workaround (adding "modes" array to MySQL config) seems to have fixed the problem.

When running this command you get the error below.
> php artisan migrate

[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER' (SQL: select * from information_schema.tables where table_schema
= sampledb and table_name = migrations)

[PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'

MySQL version: mysql Ver 8.0.12 for Win64 on x86_64 (MySQL Community Server - GPL)
PHP version: PHP 7.2.9 (cli) (built: Aug 15 2018 23:10:01) ( ZTS MSVC15 (Visual C++ 2017) x64 )

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the `php artisan migrate` command with MySQL 8.0.12 and inspect the Laravel MySQL configuration, especially the `sql_mode` setting. Done means migrations run without the `NO_AUTO_CREATE_USER` error; the issue points to the linked pull request for related discussion and the proposed configuration workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, mysql, php
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.