OTRS installation and mysql socket

Moderator: crythias

Locked
kazevil
Znuny newbie
Posts: 18
Joined: 05 Aug 2010, 16:14
Znuny Version: 3.0

OTRS installation and mysql socket

Post by kazevil »

Good evening all :-)

I have an issue during OTRS installation on my test server.

On step 2 of the installer.pl, I get the following error:

Code: Select all

Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)
So, for the mysql connection, OTRS is looking for the socket file in /tmp.

How could I change the location where OTRS is looking for the socket file??

I tried to enter the following parameter in Config.pm, but it don't work...

Code: Select all

$Self->{DatabaseDSN}="DBI:mysql:otrs=$Self->{Database};localhost=$Self->{DatabaseHost};mysql_socket=/u00/app/mysql/admin/mysqld1/socket/mysqld1.sock;";
Any help would be much appreciated :-))

Cheers

Kaz
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: OTRS installation and mysql socket

Post by crythias »

this generally indicates mysql isn't running.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
kazevil
Znuny newbie
Posts: 18
Joined: 05 Aug 2010, 16:14
Znuny Version: 3.0

Re: OTRS installation and mysql socket

Post by kazevil »

Hi crythias,

thanks for your feedback.

In fact Mysql is running:

Code: Select all

mysql@vmtestapp1: ~/ [mysqld1] ps -ef |grep mysqld
mysql     3431     1  0 02:25 ?        00:00:00 /u00/app/mysql/product/5.1.50/bin/mysqld --server-id=1 --port=3306 --log-bin=mysqld1-bin --datadir=/u00/mysqldata/mysqld1 --basedir=/u00/app/mysql/product/5.1.50 --socket=/u00/app/mysql/admin/mysqld1/socket/mysqld1.sock --pid-file=/u00/app/mysql/admin/mysqld1/socket/mysqld1.pid --log-error=/u00/app/mysql/admin/mysqld1/log/mysqld1.err --general-log=/u00/app/mysql/admin/mysqld1/log/mysqld1.log --slow_query_log=/u00/app/mysql/admin/mysqld1/log/mysqld1_slow_queries.log --language=/u00/app/mysql/product/5.1.50/share/english --tmp_table_size=64M --query_cache_size=48M --thread_cache_size=32 --net_buffer_length=8K --max_allowed_packet=20M --key_buffer_size=128M --sort_buffer_size=8M --myisam_sort_buffer_size=8M --read_buffer_size=256K --read_rnd_buffer_size=512K --table_cache=256 --tmpdir=/u00/mysqldata/mysqld1
mysql    31822 31793  0 22:10 pts/2    00:00:00 grep mysqld
mysql@vmtestapp1: ~/ [mysqld1] mysql -u root -S /u00/app/mysql/admin/mysqld1/socket/mysqld1.sock -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.50-log MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| test               |
+--------------------+
3 rows in set (0.13 sec)
Any other place, where I could check?

Regards

Kaz
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: OTRS installation and mysql socket

Post by crythias »

What "it didn't work" did you encounter with

$Self->{DatabaseDSN}="DBI:mysql:otrs=$Self->{Database};localhost=$Self->{DatabaseHost};mysql_socket=/u00/app/mysql/admin/mysqld1/socket/mysqld1.sock;";

?

It doesn't appear likely to be the same error message /tmp/mysql.sock...?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
kazevil
Znuny newbie
Posts: 18
Joined: 05 Aug 2010, 16:14
Znuny Version: 3.0

Re: OTRS installation and mysql socket

Post by kazevil »

Even then I enter this parameter in COnfig.pm, I still get the error message due to /tmp/mysql.sock.
It is like if OpenKM doesn't take the parameter in account.

Kaz
kazevil
Znuny newbie
Posts: 18
Joined: 05 Aug 2010, 16:14
Znuny Version: 3.0

Re: OTRS installation and mysql socket

Post by kazevil »

Hi,

anybody who may have an idea why the installer is still looking in /tmp for the socket even if I change Config.pm?

Regards

Kaz
kazevil
Znuny newbie
Posts: 18
Joined: 05 Aug 2010, 16:14
Znuny Version: 3.0

Re: OTRS installation and mysql socket

Post by kazevil »

Hi all,

I came a little bit forward. In order to be able install, I created a SymLink /tmp/mysql.sock pointing to my real socket file.
Install came through successfully. However I can keep this like that as at each reboot /tmp will be deleted.

So once installed, I restarted my Http Server (service httpd restart) and tried to log in OTRS. Unfortunately I always get:
Login failed! Your username or password was entered incorrectly.
I thought that it wasn't using the socket in /tmp, so I tried to follow the OTRS FAQ (http://faq.otrs.org/otrs/public.pl?Acti ... &ItemID=38) to configure my socket.
I modified then my Config.pm accordingly and restarted httpd once more.
No luck! I still can't log in :-(

I used my socket to access the otrs MySQL database and reset the root@localhost password, but it didn't bring anything.

Any idea how I could come forward?

Cheers

Kaz
Wolfgangf
Znuny ninja
Posts: 1029
Joined: 13 Apr 2009, 12:26
Znuny Version: 6.0.13
Real Name: Wolfgang Fürtbauer
Company: PBS Logitek GmbH
Location: Pinsdorf

Re: OTRS installation and mysql socket

Post by Wolfgangf »

Code: Select all

Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)
you could change the mysql config file to to path above
eg:

Code: Select all

[mysqld]
port        = 3306
socket      = /tmp/mysql.sock
and then restart mysql and go on with installation
Produktiv:
OTRS 6.0.13/ ITSM 6.0.13
OS: SUSE Linux (SLES 12, Leap), MySql 5.5.x, 5.6.x
Windows 2012 AD Integration (agents and customers), Nagios integration (incidents, CMDB), Survey, TimeAccounting
kazevil
Znuny newbie
Posts: 18
Joined: 05 Aug 2010, 16:14
Znuny Version: 3.0

Re: OTRS installation and mysql socket

Post by kazevil »

Hi,

thanks for the advice, but my config file my.cnf is already configured to point to my socket file.

Regards

Kaz
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: OTRS installation and mysql socket

Post by crythias »

Any chance you might have two mysql instances?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked