Skip to content

Conversation

@yosifkit
Copy link
Member

Copying change from mysql@64fd620

Fixes #380

@tianon
Copy link
Member

tianon commented Feb 22, 2018

LGTM 👍

SET @@SESSION.SQL_LOG_BIN=0;
DELETE FROM mysql.user WHERE user NOT IN ('mysql.session', 'mysql.sys', 'root') OR host NOT IN ('localhost') ;
DELETE FROM mysql.user WHERE user NOT IN ('mysql.infoschema', 'mysql.session', 'mysql.sys', 'root') OR host NOT IN ('localhost') ;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this released?

mysql> SELECT user FROM mysql.user;
+---------------+
| user          |
+---------------+
| root          |
| mysql.session |
| mysql.sys     |
| root          |
+---------------+
4 rows in set (0.01 sec)

mysql> SELECT VERSION();
+-----------+
| VERSION() |
+-----------+
| 8.0.11    |
+-----------+
1 row in set (0.00 sec)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, instead the logic for removing unwanted users was removed from 5.7 and 8.0 completely (it was only needed for 5.5 and 5.6). But if you are upgrading from a version where the user wasn't present (either because it was an older version or it was mistakenly deleted) it won't be automatically recreated. Have you run mysql_upgrade?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I've made mistake with docker-compose and didn't dropped old volume. Works now.

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.

4 participants