【问题标题】:Couldn't access to db with Zencart无法使用 Zencart 访问数据库
【发布时间】:2017-06-17 22:30:27
【问题描述】:

试图在另一台服务器上复制 zencart 网站,但在打开正确的端口并复制数据库后,我在互联网浏览器中打开 url 时出现此错误。

    0 DB_ERROR_NOT_CONNECTED
in:
[select * from project_version WHERE project_version_key = 'Zen-Cart Database' ]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

没有人遇到过这个错误吗?或者有如何解决这个问题的建议? 发送

【问题讨论】:

    标签: mysql database passwords zen-cart


    【解决方案1】:

    includes/configure.php 中的某些内容是错误的。非常仔细地检查每个值:

    define('DB_PREFIX', ''); 
    define('DB_SERVER', 'localhost');  
    define('DB_SERVER_USERNAME', '');
    define('DB_SERVER_PASSWORD', '');
    define('DB_DATABASE', '');
    

    您可能在其中一个中有错字,或者您可能忘记指定前缀。

    【讨论】:

    • 感谢您的回答!我会试试的
    • 欢迎来到 StackOverflow!如果这能解决您的问题,请将此答案标记为正确并投票。
    【解决方案2】:

    对于遇到同样问题的任何人。 这是因为密码在mysql上以旧格式保存。

    您应该将它们迁移到新格式以解决此问题:

    update user set password=password('<my_password>') where user = '<my_user>';
    flush privileges;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-10-03
      • 2021-05-19
      • 2019-08-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多