
Hi Danie, On Thu, Aug 04, 2005 at 10:31:01AM +0200, Danie Theron wrote:
Christian Schoepplein wrote:
On Wed, Aug 03, 2005 at 02:32:08PM +0200, Danie Theron wrote:
Ok finally got the Config.pm file setup (correctly I hope:P) , getting the following error when trying to connect to the interface:
Error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' ([..]
Traceback: ERROR: OTRS-CGI-10 Perl: 5.8.5 OS: linux Time: Wed Aug 3 14:23:59 2005
Message: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
Traceback (11236): Module: Kernel::System::DB::new (v1.44) Line: 168 Module: Kernel::System::Web::InterfaceAgent::Run (v1.7) Line: 150 Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler (v) Line: 48 Module: (eval) (v1.80) Line: 202 Module: ModPerl::RegistryCooker::run (v1.80) Line: 202 Module: ModPerl::RegistryCooker::default_handler (v1.80) Line: 168 Module: ModPerl::Registry::handler (v1.99) Line: 30
The traceback is totally unfamiliar ground for me , so any help would be appreciated.
You can connect to a mysql server either via a socket (a special file in your file system) or TCP/IP (like a connection via a network). If OTRS and the mysql DB are installed on the same machine and a connection via a mysql socket is possible, you should use this type of connection, because its faster than TCP/IP.
I checked to see if I actually have mysql.sock on my system , and it seems I didn't start mysqld as 'root' , restarted as 'root' and there it was (mysql.sock) although not in the same location as stated in the Config.pm (it was in /var/lib/mysql/mysql.sock) , so changed it accordingly.But....
OK, first of all, check if the connection is working at all. Execute the following command:
mysql -p hot -u otrs -h localhost Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 to server version: 3.23.58
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> OK so it looks like I can connect to my MySQL
Yes.
You should be able to log in to your mysql server, if ervery thing works fine.
# DatabaseDSN # (The database DSN for MySQL ==> more: "man DBD::mysql") $Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};"; So I followed the FAQ (below) and added the (edited to correspond to my mysql.sock) line : $Self->{DatabaseDSN}="DBI:mysql:otrs;hostname=localhost;mysql_socket=/var/lib/mysqld/mysqld.sock";
I then restart otrs (/etc/init.d/otrs restart : Checking database connect... DBI connect('otrs;hostname=localhost;mysql_socket=/var/lib/mysqld/mysqld.sock','otrs',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysqld/mysqld.sock' (2) at /opt/otrs/Kernel/System/DB.pm line 191 ERROR: OTRS-CheckDB-10 Perl: 5.8.5 OS: linux Time: Thu Aug 4 10:26:47 2005
Message: Can't connect to local MySQL server through socket '/var/lib/mysqld/mysqld.sock' (2)
Traceback (13914): Module: Kernel::System::DB::new (v1.44) Line: 168 Module: /opt/otrs/bin/CheckDB.pl (v1.12) Line: 47
I am quite baffled (and frustrated) by this , so any help would be hugely appreciated.
Please try the following: 1. Open the file Kernel/Config.pm and change $Self->{'SecureMode'} = 1; to $Self->{'SecureMode'} = 0; 2. Delete your otrs database manualy. Type on a linux shell: mysql -p -u root -h localhost If you are loged in, execute the following SQL statement (only if your otrs database is new and not yet used!!!!). DROP DATABASE otrs; You should see a message abuot the deleted database. 3. Call the web installer: http://your.otrs.host/otrs/installer.pl 4. Follow the steps in the installer. Normaly the installer configures the database correctly... If there are problems with mysql for example, the installation woud not finish. Best regards, Christian -- ((otrs)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Manage your communication!