Prestashop:无法建立数据库链接

时间:2016-04-08 10:40:36

标签: php mysql database prestashop prestashop-1.6

我必须完成一个几乎完成的prestashop网站的完成,这是我第一次使用prestashop,而且我对PHP和MySQL不是很熟悉。

我已经在本地下载了该网站,但是当我启动MAMP Pro时,请转到

http://localhost:8888/www/<mysite>/index.php

我只得到这个:

Link to database cannot be established: SQLSTATE[HY000] [1045] Access denied for user 'pshop'@'localhost' (using password: YES)

Prestashop的电子邮件说:

MySQL admin account : root
MySQL admin password : <adminpw>

MySQL database for Prestashop : prestashop
MySQL account for the Prestashop base : pshop
Password for the Prestashop MySQL account : <accountpw>

并在config / settings.php中我有:

<?php
define('_DB_SERVER_', 'localhost');
define('_DB_NAME_', 'ps5');
define('_DB_USER_', 'pshop');
define('_DB_PASSWD_', '<accountpw>');

实际上我可以在phpMyAdmin中看到有2个db,一个叫prestashop,一个叫ps5。从我可以看到他们有相同的定义(相同的用户,相同的客户端),所以我只是将ps5更改为config / settings.php中的prestashop,但无论如何都没有。

是否有另一个文件出现,我应该更改它以协调一切? 我应该在phpmyadmin中更改“只是在不同的情况下”的db帐户密码吗?如果这不是正确的事情,我有点担心可能的后果,我不能回去。 在phpmyadmin中是否有办法只检查帐户或数据库的当前密码是什么?

内部phpmyadmin&gt;左pannel&gt; prestashop(或ps5,相同的结果)&gt;右栏,“特权”:

客户端“localhost”上的用户“pshop”,键入“global”,具有所有权限,但没有“Grant”,我无法将其设置为yes:

GRANT ALL PRIVILEGES ON *.* TO 'pshop'@'localhost'WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;

#1045 - Access denied for user 'pshop'@'localhost' (using password: YES)

Mamp pro中的

mysql_error.log文件说:

160408 0:14:08 [Note] /Applications/MAMP/Library/bin/mysqld: Normal shutdown

160408 0:14:08 [Note] Event Scheduler: Purging the queue. 0 events
160408 0:14:08 InnoDB: Starting shutdown...
160408 0:14:09 InnoDB: Shutdown completed; log sequence number 50703588
160408 0:14:09 [Note] /Applications/MAMP/Library/bin/mysqld: Shutdown complete

160408 00:14:09 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
160408 10:10:21 mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql
160408 10:10:21 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/ is case insensitive
160408 10:10:21 [Note] Plugin 'FEDERATED' is disabled.
160408 10:10:21 InnoDB: The InnoDB memory heap is disabled
160408 10:10:21 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160408 10:10:21 InnoDB: Compressed tables use zlib 1.2.3
160408 10:10:21 InnoDB: Initializing buffer pool, size = 128.0M
160408 10:10:21 InnoDB: Completed initialization of buffer pool
160408 10:10:21 InnoDB: highest supported file format is Barracuda.
160408 10:10:22 InnoDB: Waiting for the background threads to start
160408 10:10:23 InnoDB: 5.5.42 started; log sequence number 50703588
160408 10:10:23 [Note] Event Scheduler: Loaded 0 events
160408 10:10:23 [Note] /Applications/MAMP/Library/bin/mysqld: ready for connections.
Version: '5.5.42' socket: '/Applications/MAMP/tmp/mysql/mysql.sock' port: 0 Source distribution

Apache错误日志说:

[Fri Apr 08 00:14:10 2016] [notice] caught SIGTERM, shutting down
[Fri Apr 08 10:05:20 2016] [notice] Digest: generating secret for digest authentication ...
[Fri Apr 08 10:05:20 2016] [notice] Digest: done
[Fri Apr 08 10:05:21 2016] [notice] FastCGI: process manager initialized (pid 492)
[Fri Apr 08 10:05:21 2016] [notice] Apache/2.2.29 (Unix) mod_wsgi/3.5 Python/2.7.10 PHP/5.6.10 mod_ssl/2.2.29 OpenSSL/0.9.8za DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.9 Perl/v5.22.0 configured -- resuming normal operations

和php错误日志没有说明我今天仍然有我的问题

在我的mamp pro配置中可能有问题吗?

•在mamp pro中有一个MySQL选项卡,并且有一个“更改root密码”按钮,我应该这样做吗?

它说“出于安全原因,连接到互联网时必须更改”root“mysql用户的密码”

但我只是想尝试在当地工作,所以我认为我不应该这样做?

•仍然在Mamp pro中,我有一个选择:

以用户身份执行Apache / MySQL服务器:

  • jeremieg(Apache)/ jeremieg(MySQL)

(jeremieg是我的名字和我的mac书名)

或:

  • www(Apache)/ mysql(MySQL)&gt;默认选择此项

(无论如何都无效)

•仍然在Mamp Pro:

- Default Apache port for http connections : 8888

- Default Apache port for https connections (SSL) : 8890

- MySQL port : 8889

但是,今天当我点击Mamp中的“启动服务器”时,因为Apache启动了,但是在我启动Mamp之后MySQL已经关闭了,

我有一个警告说已经使用了端口80(奇怪,因为我没有要求端口80),并且它可能导致与我的一个虚拟机发生冲突,因此我应该更改端口;但我选择了“无论如何启动服务器”,它启动了MySQL。

我也尝试在禁用little snitch之后加载index.php,以防万一(并清空缓存),但它没有改变。

0 个答案:

没有答案