问题
I was trying to create a user using:
docker exec -i database mysql -uroot -proot -e "CREATE USER 'dbadmin'@'%'"
However I ran into this ERROR:
ERROR 1054 (42S22) at line 1: Unknown column 'password_last_changed' in 'mysql.user'
回答1:
After googling for a few hours, I found the answer in this blog post:
docker exec -it container_name bash -c "mysql_upgrade -uroot -proot"
root
must be your mysql username and password
来源:https://stackoverflow.com/questions/40981983/running-mysql-upgrade-in-docker