Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How do I start the mysql database with the docker container?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Docker download image

Docker pull mysqldocker images

Create a container

Docker run-d-e MYSQL_ROOT_PASSWORD=root-- name mysql57-v / usr/local/docker_mysql/57/data/mysql:/var/lib/mysql-p 3306 name mysql57-- character-set-server=utf8mb4-- collation-server=utf8mb4_unicode_ci-- lower_case_table_names=1docker exec-it mysql57 bash

If an error occurs in the mysql started by the connection Docker:

ERROR 2059 (HY000): Authentication plugin caching_sha2_password' cannot be loaded

Solution.

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY' root';ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY' root';SELECT plugin FROM mysql.user WHERE User = 'root'

Stop it

Docker stop mysql

Start

Docker start msyql

These are the details of how to start mysql in the docker container of a MAC computer. Please pay attention to other related articles for more information.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report