【Vegas原创】Docker安装最新版wordpress

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

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享