Open-AudIT https://www.open-audit.org/phpBB3/ |
|
Manage Audits - LDAP Testing error https://www.open-audit.org/phpBB3/viewtopic.php?f=10&t=3918 |
Page 1 of 1 |
Author: | bra1ne [ Thu Dec 16, 2010 12:17 am ] |
Post subject: | Manage Audits - LDAP Testing error |
Mysql novice! I have installed Open Audit and was trying to setup a a Audit through the web pages - I have all the LDAP settings configured but when I click "Test LDAP" I get the below error message? DBI connect('database=openaudit;host=localhost;port=3306','openaudit',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at script/audit.pl line 306 I checked the server and could not find a /tmp/mysql.sock but there is one in /var/lib/mysql/mysql.sock so I amended the script in var/www/html/open-audit/scripts/ but it did not make a difference? |
Author: | jpa [ Thu Dec 16, 2010 3:13 am ] |
Post subject: | Re: Manage Audits - LDAP Testing error |
What happens if you comment out the socket setting code? So comment out all of the following in audit.pl: [code] if ( not $WINDOWS_SERVER and $host =~ /localhost/i ) { if ( -e "/var/run/mysqld/mysqld.sock" ) { $dsn .= ";mysql_socket=/var/run/mysqld/mysqld.sock"; } elsif ( -e "/tmp/mysql.sock" ) { $dsn .= ";mysql_socket=/tmp/mysql.sock"; } }[/code] |
Author: | bra1ne [ Fri Dec 17, 2010 8:06 pm ] |
Post subject: | Re: Manage Audits - LDAP Testing error |
I tried this but the strange thing is I still get the error so it appears that its not running the script in var/www/html/open-audit/scripts/ but another one from somewhere else which is confusing me! I rebooted after the changes just incase but this made no difference? |
Author: | jpa [ Sat Dec 18, 2010 2:58 am ] |
Post subject: | Re: Manage Audits - LDAP Testing error |
Have you tried a test connect using the MySQL client? Maybe your MySQL config is not correct. I would check your mysql.cnf file and check the socket value in the [client] section. |
Author: | bra1ne [ Tue Dec 21, 2010 8:19 pm ] |
Post subject: | Re: Manage Audits - LDAP Testing error |
Hi You seem to be correct in your assumption about MySQL config not being correct. I am a linux novice but I cannot find mysql.cnf (used "find / -name mysql.cnf") the mysql directory files are all in /var/lib/mysql but no conf file there. I have webmin installed and can see MYSQL in there OK. UPDATE: Found it is /etc/my.cnf when checked this and all looks OK. "socket = /var/lib/mysql/mysql.sock" but openaudit still errors trying to locate '/tmp/mysql.sock' I assume there is some issue with mysql configuration so will check this out further just dont understand why openaudit is still erroring on /tmp/mysql.sock when the script was updated to point to /var/lib/mysql/mysql.sock |
Author: | jpa [ Wed Dec 22, 2010 2:36 am ] |
Post subject: | Re: Manage Audits - LDAP Testing error |
Maybe the socket location is set in your php config? To get rid of the socket stuff altogether use 127.0.0.1 rather than localhost. This should use TCPIP rather than sockets. |
Page 1 of 1 | All times are UTC + 10 hours |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |