# mydocker **Repository Path**: liwolves/mydocker ## Basic Information - **Project Name**: mydocker - **Description**: docker 代码----- - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 4 - **Forks**: 2 - **Created**: 2022-09-24 - **Last Updated**: 2024-11-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Docker mysql - ```https://gitee.com/lWolvesl/mysql-docker.git``` ## 首先前往docker官网获取docker。 ```https://www.docker.com/get-started/``` 下载``` apple chip``` 版本的docker ![](./temp/1.png) - 防止获取docker官网文件的速度过慢,这里为大家下载了最新<2022-08-24>的官方安装包 ```网盘 百度网盘链接: https://pan.baidu.com/s/18sR-SYAnc1BEo9AYsG19kQ?pwd=pr7k 提取码: pr7k ``` - 配置阿里云镜像加速 - docker的镜像详情 ```https://hub.docker.com/``` - 运行命令 ```docker pull mysql:tag``` ```docker pull --platform linux/x86_64 mysql:tag``` ```docker run -d --name mysql-name -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password mysql:tag``` ```--restart always``` ## 安装brew - Brew的官网 ```https://brew.sh``` - 由于Brew的官方安装方式走的是Github的cdn,大家访问起来会不方便。这里内置了```ineo6```改写的官网安装方式,并且走的是中科大的源 ```bash /usr/bin/ruby -e "$(curl -fsSL https://gitee.com/liwolves/mydocker/raw/master/temp/install)" ``` # 安装mysql-client - 注意不要使用root账户 ```sh brew install mysql-client echo 'export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH"' >> ~/.zshrc ``` # 连接刚刚创建的mysql ```sh mysql -u root -P 3306 -h 127.0.0.1 -p ```