Zelengora, Bosnia and Herzegovina

Category Archives: Technology

Posts related to my job or interests

Quick way to remove duplicates from MySQL database

DROP TABLE IF EXISTS tmp;create table tmp like mytable; ALTER TABLE tmp ADD UNIQUE INDEX(text1, text2, text3, text4, text5, text6); insert IGNORE into tmp select * from mytable; delete from mytable where id not in ( select id from tmp); DROP TABLE IF EXISTS tmp;

Read more

Snort 2.9.5.5. with Barnyard2 on Ubuntu 12.04

Well I had some problems on my server with config files for Snort and Barnyard so I will write short explanation here. First in /etc/snort/snort.conf define output like output unified2: filename snort.u2, limit 128 Then in /usr/local/etc/barnyard2.conf define output to database with : output database: log, mysql, user=snort_user password=snort dbname=snortdb host=127.0.0.1 output database: alert, mysql, user=snort_user password=snort […]

Read more

Snort: libsfbpf.so.0 error

while exeucting snort -c /usr/local/snort/etc/snort.conf –dump-dynamic-rules=/usr/local/snort/so_rules Ubuntu shows following error : error while loading shared libraries: libsfbpf.so.0: cannot open shared object file: No such file or directory The same error occurs while executing: snort -c /usr/local/snort/etc/snort.conf -T The way to solve this is to type ldconfig , after that try the snort -c command as […]

Read more

Can’t start mysql – mysql respawning too fast, stopped on Ubuntu 12.04

So my server don’t want to run mysql and in syslog I can find multiple errors like miralem-ubuntu kernel: [ 882.914291] type=1400 audit(1384529343.038:33): apparmor=”STATUS” operation=”profile_replace” name=”/usr/sbin/mysqld” pid=268 Solution: Go to  /etc/mysql/my.cnf and change/or add : default-character-set = utf8 default-collation = utf8_general_ci to character_set_server = utf8 collation_server = utf8_general_ci After that you need to reconfigure your server […]

Read more