sclorg / mysql-container

MySQL container images based on Red Hat Software Collections and intended for OpenShift and general usage. Users can choose between Red Hat Enterprise Linux, Fedora, and CentOS based images.
http://softwarecollections.org
Apache License 2.0
128 stars 201 forks source link

how to switch user to root (not mysql) #233

Open weixudonga opened 6 years ago

omron93 commented 6 years ago

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.

DangerGuys commented 5 years ago

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