Project

General

Profile

Actions

Bug #22893

closed

Core: Could not initialize DB connection with query "SET CHARACTER SET utf8 ...

Added by Mark Iron over 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2010-06-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Even the config works with typo3 4.3.3 it does not work with typo3 4.4 beta3 (s. error message from the logfile further below)

The setting works for typo3 4.3.3: [SYS][setDBinit] = SET CHARACTER SET utf8; SET NAMES utf8;

---
15-06-10 20:27 - Core: Could not initialize DB connection with query "SET CHARACTER SET utf8; SET NAMES utf8;": You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET NAMES utf8' at line 1
15-06-10 20:27 - Core: Could not initialize DB connection with query "SET CHARACTER SET utf8; SET NAMES utf8;": You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET NAMES utf8' at line 1
---

regards,
Mark

MySQL log:
---
100615 20:27:23 283 Connect typo3dbadmin@localhost on
283 Query SET CHARACTER SET utf8; SET NAMES utf8
283 Init DB domain_comch
283 Query SET CHARACTER SET utf8; SET NAMES utf8
283 Query show databases
283 Init DB information_schema
283 Init DB domain_comch
---
(issue imported from #M14740)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #22964: Wrong handling of entries in textarea fields in install tool - may break installationClosedSteffen Kamper2010-06-22

Actions
Actions #1

Updated by Chris topher over 14 years ago

Missing linefeed between the two commands?

Actions #2

Updated by Mark Iron over 14 years ago

It also does not work if both commands are in separate lines like:
---
SET NAMES utf8;
SET CHARACTERS SET utf8;
---

The install tool simply adds chr(10) after saving the config .. like:
SET CHARACTER SET utf8;'.chr(10).'SET NAMES utf8;

but the error message is similar:
---
15-06-10 21:06 - Core: Could not initialize DB connection with query "SET CHARACTER SET utf8;'.chr(10).'SET NAMES utf8;": You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''.chr(10).'SET NAMES utf8' at line 1
---

Actions #3

Updated by Chris topher over 14 years ago

The command
SET CHARACTER SET utf8;
is superfluous. Don't use it. Does it work without it?

Actions #4

Updated by Mark Iron over 14 years ago

It works if there is only one command. It could be "SET character set utf8;" or "SET NAMES utf8;"

Actions #5

Updated by Chris topher over 14 years ago

Related to #22964?

Actions #6

Updated by Chris topher over 14 years ago

Should be resolved with #21501.

Actions #7

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF