Skip to content

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

@catinthesky

Description

@catinthesky

Hello,

In trying using the MySQL DB as its storage back end, in file docker-compose.sql, this line mentioned

image: mysql:9.2

Using MySQL version 9.2 after starting the MySQL container, when executing below command to initiate the DB:

cker exec -i mysql-server sh -c "mysql -u petclinic -ppetclinic petclinic < /var/lib/mysql/pmysql/user.sql"
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1064 (42000) at line 7: 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

It reported the above error, this is because higher version since 8.0, "grant" statement doesn't support this clause "'IDENTIFIED BY ", please have a check and update this file to make it consistent workable, or I can submit a PR to fix the problem.

Thanks,
Yao

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions