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
First of all, the blogger is playing the communit...
SQL paging query:background In the company's ...
1. The use of Docker compose is very similar to t...
When using the idea development tool to debug cod...
This article shares the specific code of js to ac...
Preface MySQL query uses the select command, and ...
Table of contents React upload file display progr...
The code looks like this: <!DOCTYPE html> &...
To draw a table in HTML, use the table tag tr me...
Ubuntu 20.04 does not have root login enabled by ...
Preface As a basic data structure, arrays and obj...
Install mysql5.7.18 on CentOS6.7 1. Unzip to the ...
This article shares the specific code of JavaScri...
The code looks like this: // Line style of the pa...
Recently, I have been studying the MySQL database...