mysql-container icon indicating copy to clipboard operation
mysql-container copied to clipboard

how to switch user to root (not mysql)

Open weixudonga opened this issue 7 years ago • 2 comments

weixudonga avatar Aug 01 '18 03:08 weixudonga

Mysql user is explicitly specified in Dockerfile. So default will be always this.

Changing it depends on the way you are using the image. For example with docker run you can use -u 0 parameter to run container with different user.

omron93 avatar Aug 02 '18 16:08 omron93

You can run 'docker exec -it --user root /bin/bash' into the container.Then run 'su root' change user.

DangerGuys avatar Dec 11 '18 09:12 DangerGuys