Sunday 28 July 2013

Snort with Mysql on Centos 6.3 x86_64

Now we are going to create Mysql Database to receive the Snort logs. First we need to install Mysql.
Already i install mysql if you are not , use this link to install Mysql installation


[root@snort snort_install]# mysql -u root -p

Create the database "snort" using following command


mysql> create database snort;

now i am going to check whether the database created or not using below command

mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | snort | | test | +--------------------+ 4 rows in set (0.00 sec)
Create the separate user and give all permission for snort database.

mysql> grant all on snort.* to 'snortuser'@'localhost' identified by 'test@1234';

database name --> snort
database user name --> snortuser
database user password --> test@1234

mysql> flush privileges;

Now we will restore the "create_mysql" which has the schema for the database. Refer barnyard2 directory


[root@snort barnyard2-1.9]# mysql -u snortuser -p snort < schemas/create_mysql


Now restart the mysql service

[root@snort snort_install]# service mysql restart



No comments:

Post a Comment