mattrayner / docker-lamp

A simple LAMP image using Ubuntu, Apache, PHP and MySql in a single image
Apache License 2.0
592 stars 262 forks source link

SQL syntax error #127

Open LordMurillo opened 2 years ago

LordMurillo commented 2 years ago

Hello, I have deployed the container mattrayner/lamp:latest and it shows a SQL syntax error.

ERROR 1064 (42000) at line 1: 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 ''' at line 1

Log

Updating for PHP 8.0
Replacing CLI php.ini values
Editing APACHE_RUN_GROUP environment variable
Editing phpmyadmin config
Setting up MySQL directories
Allowing Apache/PHP to write to the app
Allowing Apache/PHP to write to MySQL
Editing MySQL config
=> An empty or uninitialized MySQL volume is detected in /var/lib/mysql
=> Installing MySQL ...
=> Done!
=> Waiting for confirmation of MySQL service startup
=> Creating MySQL admin user with random password
ERROR 1064 (42000) at line 1: 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 ''' at line 1
=> Done!
========================================================================
You can now connect to this MySQL Server with lGsodg8lc66V

    mysql -uadmin -plGsodg8lc66V -h<host> -P<port>

Please remember to change the above password as soon as possible!
gmarmstrong commented 2 years ago

I get this too, although I'm not sure whether it's causing any other issues. Looks like it's caused by https://github.com/mattrayner/docker-lamp/blob/24c620372a4e89afc109126485b7ced5245a77eb/supporting_files/create_mysql_users.sh#L20