Running mysql_upgrade in Docker?

别说谁变了你拦得住时间么 提交于 2021-02-18 12:23:26

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!