Skip to content

Conversation

@henribon
Copy link

@henribon henribon commented Oct 29, 2025

Description

Fixes MySQL user creation script to be compatible with MySQL 8.0+.

Problem

The current user.sql uses deprecated syntax that fails on MySQL 8.0+:

GRANT ALL PRIVILEGES ON petclinic.* TO 'petclinic'@'%' IDENTIFIED BY 'petclinic';

Error message:

ERROR 1064 (42000): You have an error in your SQL syntax; 
check the manual that corresponds to your MySQL server version 
for the right syntax to use near 'IDENTIFIED BY 'petclinic'' at line 1

Solution

Updated to MySQL 8.0+ standard syntax following official documentation:

Fixes #2112

@henribon henribon force-pushed the fix/mysql-9-user-creation-syntax branch from 2aa794b to c1d91e8 Compare October 29, 2025 23:29
@henribon henribon changed the title fix: update MySQL user creation for MySQL 8.0+ compatibility fix: update MySQL user creation for MySQL 8.0+ compatibility Fixes #2112 Oct 29, 2025
@henribon henribon changed the title fix: update MySQL user creation for MySQL 8.0+ compatibility Fixes #2112 fix: update MySQL user creation for MySQL 8.0+ compatibility Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MySql DB user.sql script needs refining to support the high verion like the one mentioned in docker-compose.yml

2 participants