在Laravel5.3中,我使用SQLite作为我的默认DB连接,并且,我的.env文件删除了所有MySQL连接细节。当我使用artisan命令和tinker命令创建一个新条目时,获取条目就是工作良好的,。但是我无法从controller或eloquent获取或添加记录,它会引发奇怪的MySQL 连接失败错误。
PDOException in Connector.php line 55:
SQLSTATE[HY000] [2002] Connection refused
in Connector.php line 55
at PDO->__construct('mysql:h
运行php artisan migrate会导致错误: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known (SQL: select * from information_schema.tables where table_schema = homestead and table_name = migrations
and table_type = 'BASE TABLE') 服务器正在运行Ubuntu 18.04。PHP7.3,ngin
当我运行命令php artisan migrate时,我一直收到这些错误
In Connection.php line 664:
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_s
chema.tables where table_schema = homestead and table_name = migrations)
In Connector.php line 67:
SQLSTATE[HY000] [2002] Connection refused
M
我正试图在本地机器上使用Laravel5.2的Homestead中的php artisan migrate将迁移迁移到MySQL数据库。我一直收到这个错误:
[PDOException]
SQLSTATE[HY000] [2002] No connection could be made because the target machine
actively refused it.
我可以使用MySQL工作台很好地连接到数据库,但我想使用laravel的迁移特性。
我的database.php看起来像这样:
'mysql' => [
'
我对拉里威尔很陌生,我正在探索如何进行迁徙。我创建了一个新的users表,当我运行"php artisan migrate"时,它给了我"[PDOException] SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it."。我运行"composer dump-autoload",然后做"composer install",但没有joy。我将我的.env文件配置如下:
DB_CONNECT
我正在用Laravel 5构建一个web应用程序。该应用程序应该获得存储在MySQL数据库中的“类别名称”,并显示一个表单来添加新的“类别名称”。当我执行命令php artisan serve并导航到时,我收到以下错误消息:
PDOException in Connector.php line 50:
SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.
根据我读过的几篇关于堆栈溢出的帖子,遇到此错误的许多用户没有正确配置.env文件,该文件覆盖了da
新手来了。我试着跑:
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生成PHP程序,首先我用composer创建了一个博客,在这个博客中,我可以运行php artisan。然而,我从互联网上下载了一个laravel项目,我不能运行artisan并给我错误结果,如下所示。照明\数据库\QueryException
SQLSTATE[HY000] [2002] No such file or directory (SQL: select count(\*) as
aggregate from `plugins` where `name` = Ldap and `status` = 1) [Doctrine\DBAL\Dri
我在64位的CentOS 6.x上安装了一个asterisk服务器,一切正常,但是一周后当我回来的时候,我就无法访问网页管理区了。
这是错误:
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)::SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock&
我刚刚在symfony 5中发送了我的项目到主机上,我有错误: An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known 或者如果我想执行: php74-cli bin/console make:migration
In AbstractMySQLDriver.php line 112:
An exception occurred in driver: SQLSTATE[HY000] [2
我使用命令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
尝试使用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
我需要一些帮助连接外部MySQL数据库到Laravel。数据库位于Hetzner服务器上,使用tls加密连接似乎发生了故障:
==> Executing Function...
Status Code: 1
Output:
In Connection.php line 712:
SQLSTATE[HY000] [2002] (SQL: SELECT * FROM KURSE_planung )
我试着跑:php artisan migrate
还可以在Windows上使用Xampp连接到MySQL。
我发现了一个错误:
Illuminate\Database\QueryException : SQLSTATE[HY000] [1044] Access
denied for user ''@'localhost' to database 'homestead' (SQL: select *
from information_schema.tables where table_schema = homestead and
table_na
我正在尝试用我的Symfony应用程序连接到一个远程mysql数据库。如果不需要,我不想在服务器上安装mysql-服务器包,但是当我试图连接时,我会得到以下错误:
[Doctrine\DBAL\Exception\ConnectionException]
An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory
[Doctrine\DBAL\Driver\PDOException]
你好,当我使用php bin/console doctrine:migrations:migrate时,我有以下错误:
In ExceptionConverter.php line 103:
An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused
In Exception.php line 30:
SQLSTATE[HY000] [2002] Connection refused
In Driver.php line 28:
SQLSTATE[HY000] [20
my project is hosted in forge (digital ocean) laravel 5.1
我可以使用ssh文件密钥正常连接putty,只录制用户名,但当我尝试使用相同的ssh密钥文件通过heidisql连接到数据库时,我会失败。我过去可以正常连接,但在上个月的付款问题后,我总是失败,我得到
Lost connection to MySQL server at 'reading initial communication packet', system error: 0
在网页上我得到了
[PDOException] SQLSTATE[HY0