新聞中心
最近使用云服務(wù)器,學(xué)習(xí)一下Docker,今天學(xué)著使用Docker安裝mysql。首先,從阿里云的Docker Hub 上pull一個MySQL的image.

創(chuàng)新互聯(lián)建站專注于官渡網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗。 熱誠為您提供官渡營銷型網(wǎng)站建設(shè),官渡網(wǎng)站制作、官渡網(wǎng)頁設(shè)計、官渡網(wǎng)站官網(wǎng)定制、微信小程序定制開發(fā)服務(wù),打造官渡網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供官渡網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。
查看下載鏡像,就會看到已經(jīng)有了
名字太長,修改為短的tag
根據(jù)鏡像創(chuàng)建容器
啟動MySQL容器
進(jìn)入MySQL終端
[centos@liujun ~]$ docker exec -it 2a7a85124400 /bin/bash
root@2a7a85124400:/# mysql -h 127.0.0.1 -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.9 MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
網(wǎng)站名稱:CentOS下使用Docker安裝MySQL
文章起源:http://www.5511xx.com/article/cdcoipe.html


咨詢
建站咨詢
