草庐IT

sqlstate

全部标签

php - Laravel SQLSTATE[HY000] [2002] 连接被拒绝

所以我想将现有的Laravel项目部署到我的digitaloceanVPS中我用了thistutorial并且我成功上传了我的网站。我的.env文件是:APP_ENV=localAPP_KEY=myappkeyAPP_DEBUG=trueAPP_LOG_LEVEL=debugAPP_URL=http://localhostDB_CONNECTION=mysqlDB_HOST=myipDB_PORT=3306DB_DATABASE=formDB_USERNAME=rootDB_PASSWORD=mypass但问题是:我使用MySQL并创建并运行phpartisanmigrate并得到这些

php - PDO 错误 - PDOException',消息为 'SQLSTATE[HY000]: General error'

这个问题在这里已经有了答案:PDOerror:"SQLSTATE[HY000]:Generalerror"Whenupdatingdatabase(2个回答)关闭4年前。我收到这个错误:Fatalerror:Uncaughtexception'PDOException'withmessage'SQLSTATE[HY000]:Generalerror'in.....每当我用PDO执行这段代码时://Selectdatafromthetopic.$s=$dbh->prepare("SELECT*FROMforum_topicsWHEREforum_id=:forum_cat_idANDto

mysql - SQLSTATE[HY000] : General error: 2006 MySQL server has gone away on running cron job magento

我在Magento网站上工作时遇到此错误:SQLSTATE[HY000]:Generalerror:2006MySQLserverhasgoneawayonrunningcronjobmagento我有时只会遇到这个错误。seen?'read':'unread').'">';$output.=''.$overview[0]->subject.'';$output.=''.$overview[0]->from.'';$output.='on'.$overview[0]->date.'';$output.='';/*outputtheemailbody*/$output.=''.$mess

java - SQL 错误 : 0, SQLState: 08S01 通信链路故障

这个问题在这里已经有了答案:Solvinga"communicationslinkfailure"withJDBCandMySQL[duplicate](25个答案)关闭去年。我收到此错误(不那么频繁):2013-05-0816:44:35,786WARN(JDBCExceptionReporter.java:100)[org.hibernate.util.JDBCExceptionReporter,logExceptions]-SQLError:0,SQLState:08S012013-05-0816:44:35,786ERROR(JDBCExceptionReporter.java

mysql - SQLSTATE[28000] [1045] 拒绝用户 'root' @'localhost' 的访问(使用密码 : YES) Symfony2

我尝试使用Symfony2创建我的数据库,键入以下命令:phpapp/consoledoctrine:create:database结果是:CouldnotcreatedatabaseforconnectionnamedjobeetSQLSTATE[28000][1045]Accessdeniedforuser'root'@'localhost'(usingpassword:YES)我的app/config/parameters.yml文件的内容是:parameters:database_driver:pdo_mysqldatabase_host:127.0.0.1database_p

mysql - SQLSTATE[23000] : Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails

我正在尝试将值插入到我的评论表中,但出现错误。它说我不能添加或更新子行,我不知道那是什么意思。我的架构看起来像这样:----Bazadanych:`koxu1996_test`----------------------------------------------------------------Strukturatabelidlatabeli`user`--CREATETABLEIFNOTEXISTS`user`(`id`int(8)NOTNULLAUTO_INCREMENT,`username`varchar(32)COLLATEutf8_binNOTNULL,`passwo

php - 错误 : SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it

调试代码时突然出错。它有这一系列关于数据库连接的错误。ERROR:SQLSTATE[HY000][2002]Noconnectioncouldbemadebecausethetargetmachineactivelyrefusedit.(!)Fatalerror:Uncaughtexception'PDOException'withmessage'inC:\wamp\www\web\main\users.phponline15(!)PDOException:SQLSTATE[HY000][2002]Noconnectioncouldbemadebecausethetargetmachi

php - Cakephp 3.x : SQLSTATE[HY000]: General error: 11 database disk image is malformed

将我的应用程序上传到Linux时出现此错误。这在我的本地Windows系统上工作正常,但在Linux服务器上给我错误。当我对此进行搜索时,我发现这是与sqlite相关的问题。如果这是sqlite问题,那么我该如何将其更改为MySQL。请帮帮我。 最佳答案 删除/tmp/debug_kit.sqlite 关于php-Cakephp3.x:SQLSTATE[HY000]:Generalerror:11databasediskimageismalformed,我们在StackOverflow上

php - PDO 错误 : SQLSTATE[HY000]: General error: 2031

我遇到了这个烦人的错误,虽然我知道为什么会遇到这个错误,但我终其一生都找不到解决办法。if($limit){$sth->bindValue(':page',$page-1,PDO::PARAM_INT);$sth->bindValue(':entries_per_page',$page*$entries_per_page,PDO::PARAM_INT);}$sth->execute($criteria);查询包含占位符(:placeholder)。但是要添加那些LIMIT占位符,我需要使用手动方法(bindValue),否则引擎会将它们变成字符串。我没有收到Invalidnumbero

php - Laravel PDOException SQLSTATE[HY000] [1049] 未知数据库 'forge'

我正在使用Laravel连接到MySQL数据库。我遇到了这个异常:PDOExceptionSQLSTATE[HY000][1049]Unknowndatabase'forge'这是我的config.database.php'mysql'=>array('driver'=>'mysql','host'=>'localhost','database'=>'laravel','username'=>'Anastasie','password'=>'A@Laurent','charset'=>'utf8','collation'=>'utf8_unicode_ci','prefix'=>'',