0.安装docker
1. docker pull最新版的wordpress
2.docker 安装mysql
3. 配置mysql
4.启动wordpress
-p: 这里是指定 WordPress 容器的访问端口
–link: 意思是将 mysql容器挂载到 mysql,这样 WordPress 就能通过 mysql 访问到docker中的数据库了
wp:数据库名
5.进入mysql的bash,创建wp数据库
[root@3 ~]# docker exec -it mysql bash root@b310463fd2a5:/# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 34 Server version: 8.0.25 MySQL Community Server - GPL Copyright (c) 2000, 2021, Oracle and/or its affiliates. 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> create database wp; Query OK, 1 row affected (0.01 sec) mysql> exit Bye root@b310463fd2a5:/#
原文链接:https://blog.csdn.net/vegas_lee/article/details/122356623
© 版权声明
声明📢本站内容均来自互联网,归原创作者所有,如有侵权必删除。
本站文章皆由CC-4.0协议发布,如无来源则为原创,转载请注明出处。
THE END