[FLOW3-general] MySQL Troubles
Erik Frister
ef at aijko.de
Sat Feb 27 22:58:06 CET 2010
Hi,
wisdom comes after the post, as always ;)
Anyone having the same issue:
For me it was the setting of the mysql.sock file in the php.ini. I am
running PHP5.3 under Snow Leopard which also has MAMP setup. So I
figured out which php.ini is read (using phpinfo()) and then search for
mysql.default_socket = ..
pdo_mysql.default_socket = ..
I set both entries to the sock file my MAMP configuration uses (for me
that is /Applications/MAMP/tmp/mysql/mysql.sock).
And voila, it works!!
Note:
In case you get errors importing the SQL file (see my previous post),
remove the quotes (") and add backticks (`) to the fields
index,integer,float (they are reserved MySQL keywords).
I hope that someone out there saves some time setting up MySQL.
Erik
Erik Frister wrote:
> Hi all,
>
> I am trying to get a MySQL database connected to the Blog example.
> However, after spending the entire day I think I am missing something :)
>
> I am using FLOW3 alpha7. I created a MySQL database with
> latin1_general_ci and executed the SQL in
> /Packages/Framework/FLOW3/Resources/Private/Persistence/SQL/DDL.sql.
> This all works (as an aside, it doesn't work with utf8_general_ci, MySQL
> will throw a "max key length is 1000 bytes" error because of utf8 uses
> 18 bytes).
>
> Then I added the following to the Settings.yaml
>
> FLOW3:
> persistence:
> # Options for the default PDO backend
> backendOptions:
> dataSourceName: 'mysql:host=localhost;dbname=blog_dev'
> username: ef
> password: ef
>
> However, I get an exception. I think I have to add some basic data to
> the table (at least I read that in a post, but that concerned the
> TYPO3CR), but right now I get:
>
> SQLSTATE[HY000] [2002] No such file or directory
>
> PDOException thrown in file
> Packages/Framework/FLOW3/Classes/Persistence/Backend/PdoBackend.php in
> line 0.
>
> F3\FLOW3\Persistence\Backend\PdoBackend::connect()
>
> Any hints as to which steps I have to do to connect a MySQL database?
> What am I doing wrong?
>
> Thanks in advance...
> Erik
More information about the FLOW3-general
mailing list