安装Docker
配置Centos
1、创建
docker run --privileged -ti --name blingame_server -p 8989:80 centos:7.3.1611 /usr/sbin/init
备注:一定要 privileged,否则会报错误
Failed to get D-Bus connection: Operation not permitted
参考地址:https://blog.csdn.net/xiaochonghao/article/details/64438246
http://blog.51cto.com/welcomeweb/1735251
2、进入Centos
docker exec -ti Bingame_Server /bin/bash
1、安装 wget
yum -y install wget
2 安装Mysql
1、下载mysql源安装包
wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
2、安装mysql源
yum localinstall mysql57-community-release-el7-8.noarch.rpm
3、安装mysql 服务器
yum install mysql-server
4、进入mysql容器
docker exec -ti 容器ID /bin/bash
4、Docker下链接mysql
mysql -h127.0.0.1 -p3306 -uroot -p
Mysql遇到问题
1、外部工具连接失败,出现
ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded
解决方法:修改密码
https://www.cnblogs.com/chuancheng/p/8964385.html
Visual Studio
1、IndentationError:unindent does not match any outer indentation level
或者 inconsistent whitespace
解决办法:
“工具”→“选项”→“文本编辑”→“Python”→“制表符”设定: 选中【保留制表符】