|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56300 Can't construct (DB doesn't like "AUTOCOMMIT")
Submitted: 2005-02-14 15:41 UTC Modified: 2005-02-21 11:10 UTC
From: sean at caedmon dot net Assigned: hartmut (profile)
Status: Closed Package: PDO_MYSQL (PECL)
PHP Version: 5.0.3 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: sean at caedmon dot net
New email:
PHP Version: OS:


 [2005-02-14 15:41 UTC] sean at caedmon dot net
(from CVS, ~15:00EDT, 2005.02.14)

When connecting to MySQL 3.23 (constructor), I get:
SQLSTATE[HY000] [1064] You have an error in your SQL syntax near 'AUTOCOMMIT=1' at line 1

When I exception->getMessage()

MySQL version:


Reproduce code:
try {
  $PDO = new PDO('mysql:dbname=php_commits;host=localhost', 'phpcommits', 'asdu34');
catch (PDOException $e) {
  echo 'Connection failed: ' . $e->getMessage();

Expected result:
no failure

Actual result:
SQLSTATE[HY000] [1064] You have an error in your SQL syntax near 'AUTOCOMMIT=1' at line 1


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-14 23:11 UTC] sean at caedmon dot net
Temporary fix (MySQL autocommits by default, anyway, according to the docs) -- couldn't find where SET AUTOCOMMIT=1 became valid syntax.

(yes, I know that this isn't a real solution)

 [2005-02-15 00:40 UTC]
Hartmut, looks like we need to probe the mysql version before trying this.
 [2005-02-21 11:10 UTC]
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Dec 06 13:01:26 2023 UTC