VMx

vmx.im
啥都学一点的填坑人
  1. 首页
  2. 未分类
  3. 正文

gcp安装wordpress数据库问题

2020年5月3日 761点热度 0人点赞 0条评论

安装的mariadb-server使用root用户名无法登陆,需要创建一个用户名来安装wp

GRANT ALL PRIVILEGES ON databasename.* TO wordpressusername@localhost
IDENTIFIED BY "password";

databasename为wp的数据库名,wordpressusername@localhost为用户名,password 为密码,替换成你的。

nginx如果手工安装记得在

location ~ .php$ {段中的

fastcgi_pass 127.0.0.1:9000; 要与php配置文件中的一致。文件一般存放于/etc/php/7.4/fpm/pool.d/www.conf,如果没有使用ps 查看php的配置目录即可。

添加:

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

如果报404,403请修改此文件,这个跟范本中不一致。

正确的文件为:

server {

        listen       80;

        server_name  www.vmx.im ;

       access_log /var/log/nginx/vmx.im.log;

             location / {

                root /home/www/wordpress;

        index index.php index.html index.htm;

        }

        location ~ \.php$ {  

                       root /home/www/wordpress; 

            fastcgi_pass   127.0.0.1:9000;

            fastcgi_index  index.php;

            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;

            include        /etc/nginx/conf/fastcgi_params ;

    }

}

Post Views: 430
标签: 暂无
最后更新:2020年5月3日

huifei

这个人很懒,什么都没留下

点赞
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2021 vmx.im. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang