docker pull mongo mkdir ~/data sudo docker run -d -p 27017:27017 -v ~/data:/data/db mongo docker exec -it some-mongo bash docker logs some-mongo
docker pull mysql
docker run
--detach
--name=test-mysql
--env="MYSQL_ROOT_PASSWORD=mypassword"
--publish 6603:3306
--volume=/Users/rahulkumar/container/test-mysql/conf.d:/etc/mysql/conf.d
mysql
64 down vote accepted You can change the encryption of the user's password by altering the user with below Alter command :
ALTER USER 'username'@'ip_address' IDENTIFIED WITH mysql_native_password BY 'password';
OR
We can avoid this error by make it work with old password plugin-
First change the authentication plugin in my.cnf file for Linux / my.ini file in Windows:
[mysqld]
default_authentication_plugin=mysql_native_password
***mkdir -p ~/storage/docker/mysql-datadir
docker run
--detach
--name=test-mysql
--env="MYSQL_ROOT_PASSWORD=pass"
--publish 6603:3306
--volume=/Users/rahulkumar/container/test-mysql/conf.d:/etc/mysql/conf.d
--volume=/Users/rahulkumar/storage/docker/mysql-datadir:/var/lib/mysql
mysql
mysql -uroot -pmypassword -h127.0.0.1 -P6603 -e 'show global variables like "max_connections"';