Discussion:
Where is mysql.sock path configured.
Anton Müller
2010-08-09 09:49:11 UTC
Permalink
Hi,

my problem for during installing icinga-web-1.0.1
on suse linux 11.1:

the "make db-initialize" tries to connect to:

'/var/lib/mysql/mysql.sock'

But my mysql runs on:

'/var/run/mysql/mysql.sock'

I greped the whold /etc but didn't find out,
how "make db-initialize" gets his configuration.


I am just reading:

http://docs.icinga.org/latest/en/icinga-web-scratch.html

I am at step 4, "Create Database".

I type:

#> make db-initialize

I get:--------------------------
make db-initialize
Buildfile: /home/anton/install/icinga/icinga-web-1.0.1/etc/build.xml
[property] Loading /home/anton/install/icinga/icinga-web-1.0.1/etc/build.properties

icinga-web > db-initialize:

[phingcall] Calling Buildfile '/home/anton/install/icinga/icinga-web-1.0.1/etc/build.xml' with target 'db-create'
[property] Loading /home/anton/install/icinga/icinga-web-1.0.1/etc/build.properties

icinga-web > prepare:


icinga-web > db-prepare:

Use the db-user specified in icinga-webs database.xml (Needs create Database/create Table rights)?(n,y)? y

icinga-web > db-create:

Error during schema creation - are you sure the table doesn't already exist? If so, use the update command.

PDO Connection Error: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
WARNING: Initial data import may have failed due too many references.

BUILD FINISHED

# end ---------------------------------------


Could you give me a hint???

Thanks a lot

Anton
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
Michael Friedrich
2010-08-09 10:34:18 UTC
Permalink
Post by Anton Müller
Hi,
my problem for during installing icinga-web-1.0.1
'/var/lib/mysql/mysql.sock'
'/var/run/mysql/mysql.sock'
I greped the whold /etc but didn't find out,
how "make db-initialize" gets his configuration.
http://docs.icinga.org/latest/en/icinga-web-scratch.html
I am at step 4, "Create Database".
#> make db-initialize
I get:--------------------------
Post by Anton Müller
make db-initialize
Buildfile: /home/anton/install/icinga/icinga-web-1.0.1/etc/build.xml
[property] Loading /home/anton/install/icinga/icinga-web-1.0.1/etc/build.properties
[phingcall] Calling Buildfile '/home/anton/install/icinga/icinga-web-1.0.1/etc/build.xml' with target 'db-create'
[property] Loading /home/anton/install/icinga/icinga-web-1.0.1/etc/build.properties
Use the db-user specified in icinga-webs database.xml (Needs create Database/create Table rights)?(n,y)? y
Error during schema creation - are you sure the table doesn't already exist? If so, use the update command.
PDO Connection Error: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
WARNING: Initial data import may have failed due too many references.
BUILD FINISHED
# end ---------------------------------------
Could you give me a hint???
Well that's PHP PDO related - you need to point PDO where your MySQL
socket can be found. E.g. by editing the php.ini and then restarting the
webserver.

http://stackoverflow.com/questions/1435445/error-on-creating-connection-to-pdo-in-php

Kind regards,
Michael
Post by Anton Müller
Thanks a lot
Anton
--
DI (FH) Michael Friedrich

Vienna University Computer Center
Universitaetsstrasse 7 A-1010 Vienna, Austria

email: ***@univie.ac.at
phone: +43 1 4277 14359
fax: +43 1 4277 14279
web: http://www.univie.ac.at/zid

Icinga Core& IDOUtils Developer
http://www.icinga.org
Anton Müller
2010-08-09 12:12:28 UTC
Permalink
Hi Michael,

thanks for the fast response.
snip snip cut off some lines
Post by Anton Müller
Could you give me a hint???
Well that's PHP PDO related - you need to point PDO where your MySQL
socket can be found. E.g. by editing the php.ini and then restarting the
webserver.
http://stackoverflow.com/questions/1435445/error-on-creating-connection-to-pdo-in-php
Unfortunately I don't get it work since I am
using php 5.3.3.

I suppose its related to:

"php.ini directive pdo_mysql.default_socket is ignored"

see: http://bugs.php.net/bug.php?id=50829

:-(

Thanks again,

Anton
--
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
User66
2010-08-09 13:34:15 UTC
Permalink
Hi,

Have you set the socket parameter in both php.ini files, cli and apache2 ?

My installation (openSUSE 11.3, PHP 5.3.2, MySQL 5.1.46) went fine, even
though I have set "socket = /var/run/mysql/mysql.sock" in /etc/my.cnf and my
PDO parameters in php.ini are set to default (empty).
Did you check my.cnf ?

Cheers
Ralf
Post by Anton Müller
Post by Michael Friedrich
Well that's PHP PDO related - you need to point PDO where your MySQL
socket can be found. E.g. by editing the php.ini and then restarting the
webserver.
http://stackoverflow.com/questions/1435445/error-on-creating-conne
ction-to-pdo-in-php
Unfortunately I don't get it work since I am
using php 5.3.3.
"php.ini directive pdo_mysql.default_socket is ignored"
see: http://bugs.php.net/bug.php?id=50829
Anton Müller
2010-08-09 14:12:51 UTC
Permalink
Hi,
Post by User66
Have you set the socket parameter in both php.ini files, cli and apache2 ?
Yes ... but perhaps I did a mistake.

In what section die you add it...
in [PHP]?

I added a section PDO with all syntax forms to be sure:

[PDO]
PDO.mysql.default_socket = /var/run/mysql/mysql.sock
pdo_mysql.default_socket =/var/run/mysql/mysql.sock

[pdo_mysql]
PDO.mysql.default_socket = /var/run/mysql/mysql.sock
pdo_mysql.default_socket =/var/run/mysql/mysql.sock
Post by User66
My installation (openSUSE 11.3, PHP 5.3.2, MySQL 5.1.46) went fine, even
though I have set "socket = /var/run/mysql/mysql.sock" in /etc/my.cnf and my
PDO parameters in php.ini are set to default (empty).
Did you check my.cnf ?
Oh yes in my my.cnf there are only /var/run/mysql/mysql.sock,
I checked this.
Post by User66
Cheers
Ralf
Post by Anton Müller
Post by Michael Friedrich
Well that's PHP PDO related - you need to point PDO where your MySQL
socket can be found. E.g. by editing the php.ini and then restarting
the
Post by Anton Müller
Post by Michael Friedrich
webserver.
http://stackoverflow.com/questions/1435445/error-on-creating-conne
ction-to-pdo-in-php
Unfortunately I don't get it work since I am
using php 5.3.3.
"php.ini directive pdo_mysql.default_socket is ignored"
see: http://bugs.php.net/bug.php?id=50829
Thanks

Anton
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
Loading...