Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bash syntax error in run-mysqld while starting MySQL container #231

Open
fcarrus opened this issue Jul 18, 2018 · 2 comments
Open

Bash syntax error in run-mysqld while starting MySQL container #231

fcarrus opened this issue Jul 18, 2018 · 2 comments

Comments

@fcarrus
Copy link
Contributor

fcarrus commented Jul 18, 2018

A weird syntax error pops up while starting a MySQL container:

Version: '5.7.21'  socket: '/tmp/mysql.sock'  port: 0  MySQL Community Server (GPL)
---> 13:17:49     MySQL started successfully
/usr/bin/run-mysqld: line 24: [: missing `]'
=> sourcing 40-datadir-action.sh ...

Line 24 in run-mysqld says:

if [ -z "${MYSQL_ROOT_PASSWORD:-}" || is_allowing_connection_with_empty_password ]; then

while it should be:

if [ -z "${MYSQL_ROOT_PASSWORD:-}" ] || [ is_allowing_connection_with_empty_password ]; then
@praiskup
Copy link
Member

Thanks for the report. Agreed, would you mind creating a PR for this issue?

@snehlatamohite
Copy link

Hi,

We are getting similar issue when trying to start mysql5.7 container on ppc64le platform.

Docker start command - docker run -d --name mysql_database10 -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3310:3306 registry.access.redhat.com/rhscl/mysql-57-rhel7

container logs -
2018-08-17T10:34:09.618630Z 7 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2018-08-17T10:34:09.618677Z 7 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-08-17T10:34:09.618694Z 7 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-08-17T10:34:09.618741Z 7 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-08-17T10:34:09.618750Z 7 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-08-17T10:34:09.618774Z 7 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2018-08-17T10:34:09.619070Z 7 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-08-17T10:34:09.619088Z 7 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
/usr/bin/run-mysqld: line 24: [: missing `]'
---> 10:34:09 Initialization finished
=> sourcing 40-datadir-action.sh ...
---> 10:34:10 Running datadir action: upgrade-warn
---> 10:34:10 MySQL server version check passed, both server and data directory are version 5.7.
=> sourcing 50-passwd-change.sh ...

We have applied the above mentioned patch but after that container does not get started and exits.

Observations -
curl command gets response however mysql does not work
root@pts00606-vm15:~# curl localhost:3310
5.7.21z\pNPW"▒▒▒6NUb<)-}ok!2mysql_native_password▒Got packets out of order

root@pts00606-vm15:~# mysql -h localhost -p 3310 -u user
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Please help to get the mysql running and also any help on how to access mysql container will be appreciated.

Thanks,
Snehlata Mohite.

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

No branches or pull requests

3 participants