php - 连接数据库时出错 : Access denied for user 'cats' @'localhost' (using password: YES)

标签 php mysql wamp

我已使用以下用户创建了一个数据库:'auc'@'%''auc'@'localhost''root' @127.0.0.1''root'@'::1''root'@'localhost'。 但是当我尝试连接到 WAMP 项目时,它拒绝我访问数据库并显示以下消息:

Error Connecting to Database Access denied for user 'cats'@'localhost' (using password: YES)

但是我的用户列表中没有用户“cats”,任何人都可以帮助我解决这些问题: * 用户问题(我在用户列表中找不到的用户) ** 如何允许访问项目

谢谢

最佳答案

根据 OpenCats(开源项目)https://github.com/opencats/OpenCATS

config.php 定义了以下常量,

/* Database configuration. */
define('DATABASE_USER', 'cats');
define('DATABASE_PASS', 'password');
define('DATABASE_HOST', 'localhost');
define('DATABASE_NAME', 'cats_dev'); 

我想您也应该在这里进行更改。

关于php - 连接数据库时出错 : Access denied for user 'cats' @'localhost' (using password: YES),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51745447/

相关文章:

php - 连接到 comment_text() 以添加周围的标签

php - 使用 CakePHP 销毁 session

MySQL 作为服务未运行

mysql - order by 和 unique 对性能有影响

php - 在 Windows 上的 WAMP 服务器中创建符号链接(symbolic link)

php - 如何让 MongoDB 与 php 5.3.5 & wamp 一起使用?

php - 对 PHP 数组进行排序、分组和计数

php - html与php的编码

wamp - Windows 7 机器上的 WAMP Server 2 托盘图标中的菜单不可用

php - MongoDB 作为 MySQL 缓存