zoukankan      html  css  js  c++  java
  • wordpress安装记录

    wordpress 已经完全部署到Linux后,进行开始安装的时候,数据库信息都填入好了(前提是:链接信息输入都正确

    然后点击会报错,说是链接数据库失败(数据库是建在阿里云服务器上的),但是具体不知道是什么错误

    解决方案:

    此时应该把php-fpm的错误日志给打开,看看具体是什么原因导致的

    在php-fpm的配置文件中(一般位于php安装目录下的etc/php-fpm.conf)配置php错误日志的文件路径。
    1
    2
    3
    4
    5
    6
    ; Error log file
    ; If it's set to "syslog", log is sent to syslogd instead of being written
    ; in a local file.
    ; Note: the default prefix is /home/wangwei/php/var
    ; Default Value: log/php-fpm.log
    ;error_log = log/php-fpm.log
    如上是我的php-fpm.conf文件中配置错误日志的地方。把error_log = log/php-fpm.log之前的;去掉,然后修改为:
    1
    2
    3
    4
    5
    6
    ; Error log file
    ; If it's set to "syslog", log is sent to syslogd instead of being written
    ; in a local file.
    ; Note: the default prefix is /home/wangwei/php/var
    ; Default Value: log/php-fpm.log
    error_log = /home/work/log/php-fpm.log.wf
    修改之后,保存配置,然后重启php-fpm就可以啦。
    注意如果用相对路径的话,的路径的前缀是基于php安装目录的var目录的。

    之后再次输入信息,进行安装,则在页面上输出了错误信息:

    Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file' in /home/hailong.xhl/test.php:8
    

    问题是我安装MySQL版本太低,密码是旧的16位格式。需要改成新的41位格式,具体操作如下:

    SET old_passwords =0;
    UPDATE mysql.user SET Password =PASSWORD('yourpassword') WHERE User='yourname' limit 1;
    SELECT LENGTH(Password) FROM mysql.user WHERE User='yourname';
    

    然后重启MySQL服务:service mysqld restart  

    重新安装OK

  • 相关阅读:
    [FPGA与ASIC] 优化方法
    学习《中医药治疗热病的作用机理(韩晶岩)》的体会
    使用Capture CIS Lite仿真电路
    Everything软件-集本地文件搜索、文件服务器、批量操作文件等若干功能于一身的高效率软件
    注册表改右键菜单和默认程序
    Qt Quick开发教程4-QML拖放
    Qt Quick开发教程4--使用第三方QML UI包
    个人 PC/Android 常用软件列表
    Qt Quick开发教程3-C++与QML联合开发
    Qt Quick开发教程2-QML语法
  • 原文地址:https://www.cnblogs.com/holdon521/p/5670139.html
Copyright © 2011-2022 走看看