新手来了。我试着跑:
php artisan migrate
但我知道这些错误:
In Connection.php line 664:
SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (usin
g password: YES) (SQL: select * from information_schema.tables where table_
schema = homestead and table_name = migrations)
诚然,我是Laravel和后端开发的新手,但我试图在浏览器中打开Laravel项目,并收到一条错误消息。我从一个与另一组开发人员一起工作的客户端继承了这个项目,他们已经开始AWOL了,所以我要自己去找出问题所在。
第一条错误消息是:
**Warning:** require(C:\xampp\htdocs\vizzue\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in **C:\xampp\htdocs\vizzue\bootstrap\autoload.php** on
我对数据库做了一些记录,并不时地出现以下错误:
local.ERROR: exception 'PDOException' with message 'SQLSTATE[HY000]
[1045] Access denied for user 'homestead'@'localhost'
(using password: YES)' in
:\WEB\litraen\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:55
我拿到文件
我的网站运行良好,除非我为mysql执行备份功能时,它会抛出以下错误:
'/archive/db-backup-date-09-09-2015-time-10-30-04/accounts.csv‘:SQLSTATE28000:无效授权规范:用户’用户名‘@’localhost‘被拒绝1045次访问(使用密码: YES) (SQLSTATE28000: SELECT * INTO帐户中的SQLSTATE28000)
我试过这样的说法:
GRANT FILE ON \*.\* TO 'username'@'localhost'
但它会抛出另一个错误
我使用命令php artisan migrate迁移我的数据库连接,但是我仍然得到相同的错误,我检查了所有东西,没有错。我使用的连接与我在Laravel4.2中使用的相同。
下面是我在我的控制台上得到的信息:
exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)' in C:\xampp\htdocs\Projects\blo
谁能解释一下为什么会出现这个错误,以及如何解决这个问题?我读了几个同样的堆栈溢出问题,但仍然不起作用。
PDOException in Connector.php line 119:
SQLSTATE[HY000] [1045]
Access denied for user 'homestead'@'localhost' (using password: YES)
我的.env文件
APP_ENV=local
APP_KEY=base64:pAoq6D+Xq2VXHQ9/z1f2ecd5gD104FfBnp5w/UVTV0Q=
APP_DEBUG=tru
我正在通过Vagrant运行Homestead本地的Laravel安装。我通过ssh (迷走区ssh)登录到homestead,并使用主机本地主机、用户家园、密码秘密连接到MySQL。我能够成功地连接,并运行显示数据库;告诉我那里有一个information_schema数据库。我认为一切都很好,我可以为我的Laravel项目创建一个新的数据库,然后开始工作。
不幸的是,运行CREATE数据库mynewdb;返回:
错误1044 (42000):拒绝用户“住宅”@“localhost”访问数据库“mynewdb”
我尝试通过以下方式给予宅基地用户更多的特权:
GRANT ALL PRIVILE
我已经在一台新服务器上部署了一个项目。当我发出
php artisan down
我得到了
[PDOException]
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using pas
sword: YES)
为什么它要尝试访问数据库?为什么是root?我很困惑。
我今天刚开始使用Homestead,到目前为止,我不知道我在做什么,之前我使用的是Laravel附带的内置PHP服务器,我在我的电脑上单独安装了MySQL服务器和工作台。
有了这个设置,我可以很容易地连接到我的数据库,然而,自从我的Homestead运行以来,我似乎无法再次访问该数据库。此错误不断弹出:
3/3 ErrorException in Connector.php line 47: SQLSTATE[HY000] [1045]
Access denied for user 'myproject_db101'@'localhost' (using pa
我随机收到服务器错误,因为Laravel正在尝试连接到生产数据库,尽管我设置了一个.env文件,并且大部分时间它都连接到正确的数据库。
下面是我收到的错误:
[2018-02-17 08:05:54] production.ERROR: SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: NO) (SQL: select * from information_schema.tables where table_schema = forge and t
在MySQL数据库中为用户设置密码后,我无法连接到Magento。我怎么才能解决这个问题?
Error: SQLSTATE[HY000] [1045] Access denied for user 'xxx'@'localhost' (using password: YES).
我试图删除pasword,但没有成功,方法是转到phpMyAdmin并在SQL数据库上运行此命令。
SET PASSWORD FOR 'xxx_username'@'localhost' = PASSWORD('');
我得到了一个错误:
尝试使用DB_PORT=3306进行迁移时出现此错误
SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES) (SQL: select * from information_schema.tables where table_schema = laravel and table_name = migrations and table_type = 'BASE TABLE')
因此,我必须将DB_PORT更改为DB_POR