Skip to content

added .cnf affects image initialization  #490

Closed
@taylorchu

Description

@taylorchu

If mysql .cnf is added when container starts, and it has a [client] section, incorrect password will be used in the init script.

[client]
user=root
password=unprotected
database=xxx_development

then init will fail like this:

mysql_1                  | MySQL init process in progress...
mysql_1                  | 2018-09-13T02:53:44.017882Z 29 [Note] Access denied for user 'root'@'localhost' (using password: YES)
mysql_1                  | MySQL init process in progress...
mysql_1                  | 2018-09-13T02:53:45.025505Z 30 [Note] Access denied for user 'root'@'localhost' (using password: YES)
mysql_1                  | MySQL init process in progress...
mysql_1                  | 2018-09-13T02:53:46.032175Z 31 [Note] Access denied for user 'root'@'localhost' (using password: YES)
mysql_1                  | MySQL init process in progress...
mysql_1                  | MySQL init process failed.

We should probably explicitly use password here:

mysql=( mysql --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" )

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions