The first step is to create a mysql containerdocker exec -it container ID /bin/bash Step 2: Connect to MySQLmysql -uroot -p After entering the password, log in to the MySQL terminal Step 3: Change passwordSET PASSWORD FOR 'root' = PASSWORD('set password'); Step 4: RestartRestart the mysql container docker restart container id Supplement: Docker starts the MySQL container to start the initialization default password problem -e MYSQL_ROOT_PASSWORD docker run -p 3308:3308 --name=mysql -e MYSQL_ROOT_PASSWORD=123456 mysql:5.6 Initializing database [root@localhost mugutu]# docker run -p 3308:3308 --name=mysql -e MYSQL_ROOT_PASSWORD=123456 mysql:5.6 Initializing database 2018-12-02 13:42:53 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2018-12-02 13:42:53 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap. 2018-12-02 13:42:53 0 [Note] /usr/sbin/mysqld (mysqld 5.6.41) started as process 32 ... The above is my personal experience. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. If there are any mistakes or incomplete considerations, please feel free to correct me. You may also be interested in:
|
<<: Scoring rules of YSlow, a webpage scoring plugin developed by Yahoo
>>: Use of filter() array filter in JS
Here are 10 tips on how to design better-usable w...
1. First, you need to know what will trigger the v...
Table of contents background 1. The query conditi...
Preface: In some previous articles, we often see ...
This article shares the specific code for the js ...
1. Introduction After MySQL is started, BufferPoo...
html ¶ <html></html> html:xml ¶ <h...
Table of contents 1. Introduction 2. Solution Imp...
When doing web development, you may encounter the...
Table of contents Preface Detect Zookeeper servic...
1.Mysql connection method To understand the MySQL...
How to check the status of Linux firewall 1. Basi...
1. The Chinese garbled characters appear in MySQL...
This article shares the specific code for JavaScr...
Let's briefly sort out the configuration of s...