Comments (1)
@Drswith 您好,1. 在使用 docker 暴露端口前,您需要确定您的宿主机的 3306 端口是否已经被占用。如果已经被常用,需要映射到其它端口。2. docker 镜像中的 mariadb 被设置设置成仅止除了 localhost 主机之外禁止访问,你需要登录 docker 后自行调整权限。或者使用 CREATE USER 命令为自己创建一个新的管理用户(推荐)。
具体操作如下:
- 使用 docker exec 启动 docker 镜像的 shell
- 使用
mysql -uroot -p123456
来登录数据库 - 使用
create user 'admin'@'%' identified by '123456';
创建一个用户名是 admin 密码是 123456 并允许任何 host 访问数据库的用户。 - 使用
grant all privileges on codefever_community.* to 'admin'@'%';
为用户授权数据库权限 - 使用
flush privileges;
来更新权限设置。 - 在宿主机上使用 admin / 123456 来访问数据库
from codefever.
Related Issues (20)
- 提交的图片和Markdown文件的图片无法正常显示 HOT 1
- 请问威联通或者极空间nas的Docker如何配置 HOT 1
- docker容器配置sql的环境变量不生效 HOT 1
- 迁移服务导致的push失败 HOT 1
- 容器目录映射失败 HOT 2
- BUG:保护分支规则删除失败 HOT 2
- 创建超过1个标签错误 HOT 2
- error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 HOT 10
- 关于功能建议 HOT 1
- k8s 环境下无法访问 HOT 13
- 关于登录上去仓库转圈圈的问题 HOT 5
- 在当前最新版(f2311b15)发现一个rce漏洞, 我应该如何与您联系? HOT 1
- 最新版docker部署报错 HOT 1
- Docker镜像安装遇到问题 HOT 3
- docker安装好,遇到的问题 HOT 1
- 增加CI/CD功能 HOT 1
- The Codefever has a Remote Command Execute Vulnerability In latest version HOT 1
- 系统迁移问题 HOT 5
- 使用ssh登录进codefever Docker HOT 1
- Web访问报错 Disallowed Key Characters. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codefever.