da667 / Autosnort

Repo for autosnort scripts.
MIT License
157 stars 89 forks source link

Odd failure on barnyard Schema create #9

Closed sniglet closed 10 years ago

sniglet commented 11 years ago

The script asked for the Mysql root password. On entering (a possibly bad password), the script hits a loop, repeating:

./autosnort-centOS-ppinteg.sh: line 695: /usr/src/barnyard2*/schemas/create_mysql: No such file or directory the command did NOT complete successfully. (bad password?) Please try again.

as fast as the console will allow.

da667 commented 11 years ago

Hey there!

thanks for reporting this issue.

Usually when this happens its because barnyard2 didn't get pulled properly from securixlive.com, the original home of BY2. I'm in the process of changing this portion of the script to pull barnyard 2 from github as opposed to securix, but in the meantime, can you check the following:

  1. After running the script is there are file called barnyard2.tar.gz in /usr/src?
  2. Is there a barnyard2 directory in /usr/src?
  3. Can you run this command manually and tell me whether or not it successfully downloads the .tar.gz file? wget http://www.securixlive.com/download/barnyard2/barnyard2-1.9.tar.gz -O barnyard2.tar.gz

The error seems to be indicating that the database schemas that are used to generate BY2's database structure aren't there. Only time I've seen this happen is when the script failed to download the .tar.gz file in question.

Thanks again!.

DA

On Mon, Feb 25, 2013 at 12:48 PM, sniglet notifications@github.com wrote:

The script asked for the Mysql root password. On entering (a possibly bad password), the script hits a loop, repeating:

./autosnort-centOS-ppinteg.sh: line 695: /usr/src/barnyard2*/schemas/create_mysql: No such file or directory the command did NOT complete successfully. (bad password?) Please try again.

as fast as the console will allow.

— Reply to this email directly or view it on GitHubhttps://github.com/da667/Autosnort/issues/9.

when does reality end? when does fantasy begin?

sniglet commented 11 years ago

Sure, will do so in the morning.

On Monday, February 25, 2013, da_667 wrote:

Hey there!

thanks for reporting this issue.

Usually when this happens its because barnyard2 didn't get pulled properly from securixlive.com, the original home of BY2. I'm in the process of changing this portion of the script to pull barnyard 2 from github as opposed to securix, but in the meantime, can you check the following:

  1. After running the script is there are file called barnyard2.tar.gz in /usr/src?
  2. Is there a barnyard2 directory in /usr/src?
  3. Can you run this command manually and tell me whether or not it successfully downloads the .tar.gz file? wget http://www.securixlive.com/download/barnyard2/barnyard2-1.9.tar.gz-O barnyard2.tar.gz

The error seems to be indicating that the database schemas that are used to generate BY2's database structure aren't there. Only time I've seen this happen is when the script failed to download the .tar.gz file in question.

Thanks again!.

DA

On Mon, Feb 25, 2013 at 12:48 PM, sniglet <notifications@github.com<javascript:_e({}, 'cvml', 'notifications@github.com');>> wrote:

The script asked for the Mysql root password. On entering (a possibly bad password), the script hits a loop, repeating:

./autosnort-centOS-ppinteg.sh: line 695: /usr/src/barnyard2*/schemas/create_mysql: No such file or directory the command did NOT complete successfully. (bad password?) Please try again.

as fast as the console will allow.

— Reply to this email directly or view it on GitHub< https://github.com/da667/Autosnort/issues/9>.

when does reality end? when does fantasy begin?

— Reply to this email directly or view it on GitHubhttps://github.com/da667/Autosnort/issues/9#issuecomment-14083341 .

sniglet commented 11 years ago
  1. After running the script is there are file called barnyard2.tar.gz in /usr/src?

yes

  1. Is there a barnyard2 directory in /usr/src?

There is a barnyard2-1.9 directory

  1. Can you run this command manually and tell me whether or not it successfully downloads the .tar.gz file? wget http://www.securixlive.com/download/barnyard2/barnyard2-1.9.tar.gz -O barnyard2.tar.gz

it does.

On Feb 25, 2013, at 4:32 PM, da_667 notifications@github.com wrote:

Hey there!

thanks for reporting this issue.

Usually when this happens its because barnyard2 didn't get pulled properly from securixlive.com, the original home of BY2. I'm in the process of changing this portion of the script to pull barnyard 2 from github as opposed to securix, but in the meantime, can you check the following:

  1. After running the script is there are file called barnyard2.tar.gz in /usr/src?
  2. Is there a barnyard2 directory in /usr/src?
  3. Can you run this command manually and tell me whether or not it successfully downloads the .tar.gz file? wget http://www.securixlive.com/download/barnyard2/barnyard2-1.9.tar.gz -O barnyard2.tar.gz

The error seems to be indicating that the database schemas that are used to generate BY2's database structure aren't there. Only time I've seen this happen is when the script failed to download the .tar.gz file in question.

Thanks again!.

DA

On Mon, Feb 25, 2013 at 12:48 PM, sniglet notifications@github.com wrote:

The script asked for the Mysql root password. On entering (a possibly bad password), the script hits a loop, repeating:

./autosnort-centOS-ppinteg.sh: line 695: /usr/src/barnyard2*/schemas/create_mysql: No such file or directory the command did NOT complete successfully. (bad password?) Please try again.

as fast as the console will allow.

— Reply to this email directly or view it on GitHubhttps://github.com/da667/Autosnort/issues/9.

when does reality end? when does fantasy begin? — Reply to this email directly or view it on GitHub.

sniglet commented 11 years ago

Interestingly, the error says /usr/src/barnyard2*/schemas/create_mysql: No such file or directory

but I can cat it: [root@251ids2 Autosnort - CentOS]# more /usr/src/barnyard2*/schemas/create_mysql :::::::::::::: /usr/src/barnyard2-1.9/schemas/create_mysql ::::::::::::::

On Feb 26, 2013, at 12:49 PM, Mike Miller mike@millertwinracing.com wrote:

  1. After running the script is there are file called barnyard2.tar.gz in /usr/src?

yes

  1. Is there a barnyard2 directory in /usr/src?

There is a barnyard2-1.9 directory

  1. Can you run this command manually and tell me whether or not it successfully downloads the .tar.gz file? wget http://www.securixlive.com/download/barnyard2/barnyard2-1.9.tar.gz -O barnyard2.tar.gz

it does.

On Feb 25, 2013, at 4:32 PM, da_667 notifications@github.com wrote:

Hey there!

thanks for reporting this issue.

Usually when this happens its because barnyard2 didn't get pulled properly from securixlive.com, the original home of BY2. I'm in the process of changing this portion of the script to pull barnyard 2 from github as opposed to securix, but in the meantime, can you check the following:

  1. After running the script is there are file called barnyard2.tar.gz in /usr/src?
  2. Is there a barnyard2 directory in /usr/src?
  3. Can you run this command manually and tell me whether or not it successfully downloads the .tar.gz file? wget http://www.securixlive.com/download/barnyard2/barnyard2-1.9.tar.gz -O barnyard2.tar.gz

The error seems to be indicating that the database schemas that are used to generate BY2's database structure aren't there. Only time I've seen this happen is when the script failed to download the .tar.gz file in question.

Thanks again!.

DA

On Mon, Feb 25, 2013 at 12:48 PM, sniglet notifications@github.com wrote:

The script asked for the Mysql root password. On entering (a possibly bad password), the script hits a loop, repeating:

./autosnort-centOS-ppinteg.sh: line 695: /usr/src/barnyard2*/schemas/create_mysql: No such file or directory the command did NOT complete successfully. (bad password?) Please try again.

as fast as the console will allow.

— Reply to this email directly or view it on GitHubhttps://github.com/da667/Autosnort/issues/9.

when does reality end? when does fantasy begin? — Reply to this email directly or view it on GitHub.

sniglet commented 11 years ago

Some potentially helpful output:

[root@251ids2 Autosnort - CentOS]# cat /usr/src/barnyard2*/schemas/create_mysql | mysql -u root -p -D snort Enter password: ERROR 1050 (42S01) at line 193: Table 'schema' already exists [root@251ids2 Autosnort - CentOS]# mysqladmin -u root -p drop snort Enter password: Dropping the database is potentially a very bad thing to do. Any data stored in the database will be destroyed.

Do you really want to drop the 'snort' database [y/N] y Database "snort" dropped

[root@251ids2 Autosnort - CentOS]# mysql -u root -p -e "create database snort;" Enter password: [root@251ids2 Autosnort - CentOS]# cat /usr/src/barnyard2*/schemas/create_mysql | mysql -u root -p -D snort Enter password: ERROR 1050 (42S01) at line 193: Table 'schema' already exists [root@251ids2 Autosnort - CentOS]#

On Feb 26, 2013, at 12:59 PM, Mike Miller mike@millertwinracing.com wrote:

Interestingly, the error says /usr/src/barnyard2*/schemas/create_mysql: No such file or directory

but I can cat it: [root@251ids2 Autosnort - CentOS]# more /usr/src/barnyard2*/schemas/create_mysql :::::::::::::: /usr/src/barnyard2-1.9/schemas/create_mysql ::::::::::::::

On Feb 26, 2013, at 12:49 PM, Mike Miller mike@millertwinracing.com wrote:

  1. After running the script is there are file called barnyard2.tar.gz in /usr/src?

yes

  1. Is there a barnyard2 directory in /usr/src?

There is a barnyard2-1.9 directory

  1. Can you run this command manually and tell me whether or not it successfully downloads the .tar.gz file? wget http://www.securixlive.com/download/barnyard2/barnyard2-1.9.tar.gz -O barnyard2.tar.gz

it does.

On Feb 25, 2013, at 4:32 PM, da_667 notifications@github.com wrote:

Hey there!

thanks for reporting this issue.

Usually when this happens its because barnyard2 didn't get pulled properly from securixlive.com, the original home of BY2. I'm in the process of changing this portion of the script to pull barnyard 2 from github as opposed to securix, but in the meantime, can you check the following:

  1. After running the script is there are file called barnyard2.tar.gz in /usr/src?
  2. Is there a barnyard2 directory in /usr/src?
  3. Can you run this command manually and tell me whether or not it successfully downloads the .tar.gz file? wget http://www.securixlive.com/download/barnyard2/barnyard2-1.9.tar.gz -O barnyard2.tar.gz

The error seems to be indicating that the database schemas that are used to generate BY2's database structure aren't there. Only time I've seen this happen is when the script failed to download the .tar.gz file in question.

Thanks again!.

DA

On Mon, Feb 25, 2013 at 12:48 PM, sniglet notifications@github.com wrote:

The script asked for the Mysql root password. On entering (a possibly bad password), the script hits a loop, repeating:

./autosnort-centOS-ppinteg.sh: line 695: /usr/src/barnyard2*/schemas/create_mysql: No such file or directory the command did NOT complete successfully. (bad password?) Please try again.

as fast as the console will allow.

— Reply to this email directly or view it on GitHubhttps://github.com/da667/Autosnort/issues/9.

when does reality end? when does fantasy begin? — Reply to this email directly or view it on GitHub.

da667 commented 11 years ago

Thanks for the additional output and time for helping to troubleshoot this. Apologies you're still having issues here.Can you answer a few questions, so that I can try to reproduce this?

  1. I'm gathering that you are running the box on CentOS based on what I see in the prompt on your system. Can you run lsb_release -a so I can determine what version of CentOS you are running?
  2. Are you running the script as the root user, or via sudo?
  3. Can you run ls -al against /usr/src/barnyard2 ? just want to verify file permissions. Not that it should matter as root.. but just to be sure.
  4. Can you try running the drop statement again and doing an ls -al of /var/lib/mysql, looking for any files with "snort" in the name?

It's very weird, these problems. The files are right there, and you very clearly told mysql to DROP the database in any case. Soon as I get a software version for CentOS back, I'll try to reproduce the issue here.

Thank you,

DA

On Tue, Feb 26, 2013 at 3:30 PM, sniglet notifications@github.com wrote:

Some potentially helpful output:

[root@251ids2 Autosnort - CentOS]# cat /usr/src/barnyard2*/schemas/create_mysql | mysql -u root -p -D snort Enter password: ERROR 1050 (42S01) at line 193: Table 'schema' already exists [root@251ids2 Autosnort - CentOS]# mysqladmin -u root -p drop snort Enter password: Dropping the database is potentially a very bad thing to do. Any data stored in the database will be destroyed.

Do you really want to drop the 'snort' database [y/N] y Database "snort" dropped

[root@251ids2 Autosnort - CentOS]# mysql -u root -p -e "create database snort;" Enter password: [root@251ids2 Autosnort - CentOS]# cat /usr/src/barnyard2*/schemas/create_mysql | mysql -u root -p -D snort Enter password: ERROR 1050 (42S01) at line 193: Table 'schema' already exists [root@251ids2 Autosnort - CentOS]#

On Feb 26, 2013, at 12:59 PM, Mike Miller mike@millertwinracing.com wrote:

Interestingly, the error says /usr/src/barnyard2*/schemas/create_mysql: No such file or directory

but I can cat it: [root@251ids2 Autosnort - CentOS]# more /usr/src/barnyard2*/schemas/create_mysql :::::::::::::: /usr/src/barnyard2-1.9/schemas/create_mysql ::::::::::::::

On Feb 26, 2013, at 12:49 PM, Mike Miller mike@millertwinracing.com wrote:

  1. After running the script is there are file called barnyard2.tar.gz in /usr/src?

yes

  1. Is there a barnyard2 directory in /usr/src?

There is a barnyard2-1.9 directory

  1. Can you run this command manually and tell me whether or not it successfully downloads the .tar.gz file? wget http://www.securixlive.com/download/barnyard2/barnyard2-1.9.tar.gz -O barnyard2.tar.gz

it does.

On Feb 25, 2013, at 4:32 PM, da_667 notifications@github.com wrote:

Hey there!

thanks for reporting this issue.

Usually when this happens its because barnyard2 didn't get pulled properly from securixlive.com, the original home of BY2. I'm in the process of changing this portion of the script to pull barnyard 2 from github as opposed to securix, but in the meantime, can you check the following:

  1. After running the script is there are file called barnyard2.tar.gz in /usr/src?
  2. Is there a barnyard2 directory in /usr/src?
  3. Can you run this command manually and tell me whether or not it successfully downloads the .tar.gz file? wget http://www.securixlive.com/download/barnyard2/barnyard2-1.9.tar.gz -O barnyard2.tar.gz

The error seems to be indicating that the database schemas that are used to generate BY2's database structure aren't there. Only time I've seen this happen is when the script failed to download the .tar.gz file in question.

Thanks again!.

DA

On Mon, Feb 25, 2013 at 12:48 PM, sniglet notifications@github.com wrote:

The script asked for the Mysql root password. On entering (a possibly bad password), the script hits a loop, repeating:

./autosnort-centOS-ppinteg.sh: line 695: /usr/src/barnyard2*/schemas/create_mysql: No such file or directory the command did NOT complete successfully. (bad password?) Please try again.

as fast as the console will allow.

— Reply to this email directly or view it on GitHub< https://github.com/da667/Autosnort/issues/9>.

when does reality end? when does fantasy begin? — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/da667/Autosnort/issues/9#issuecomment-14137803 .

when does reality end? when does fantasy begin?

da667 commented 11 years ago

Sorry, one more thing to try as well. Can I have you run the command the script uses to create the barnyard 2 database schema?

Remove and recreate the database the same way you showed me you did (DROP snort, create snort) then run this command: mysql -u root -p -D snort < /usr/src/barnyard2*/schemas/create_mysql

there should be no functional difference between the way you did and the way the script does it, but I'd rather leave no stone unturned. You know?

Thanks again!

-DA

On Tue, Feb 26, 2013 at 4:32 PM, Tony Robinson deusexmachina667@gmail.comwrote:

Thanks for the additional output and time for helping to troubleshoot this. Apologies you're still having issues here.Can you answer a few questions, so that I can try to reproduce this?

  1. I'm gathering that you are running the box on CentOS based on what I see in the prompt on your system. Can you run lsb_release -a so I can determine what version of CentOS you are running?
  2. Are you running the script as the root user, or via sudo?
  3. Can you run ls -al against /usr/src/barnyard2 ? just want to verify file permissions. Not that it should matter as root.. but just to be sure.
  4. Can you try running the drop statement again and doing an ls -al of /var/lib/mysql, looking for any files with "snort" in the name?

It's very weird, these problems. The files are right there, and you very clearly told mysql to DROP the database in any case. Soon as I get a software version for CentOS back, I'll try to reproduce the issue here.

Thank you,

DA

On Tue, Feb 26, 2013 at 3:30 PM, sniglet notifications@github.com wrote:

Some potentially helpful output:

[root@251ids2 Autosnort - CentOS]# cat /usr/src/barnyard2*/schemas/create_mysql | mysql -u root -p -D snort Enter password: ERROR 1050 (42S01) at line 193: Table 'schema' already exists [root@251ids2 Autosnort - CentOS]# mysqladmin -u root -p drop snort Enter password: Dropping the database is potentially a very bad thing to do. Any data stored in the database will be destroyed.

Do you really want to drop the 'snort' database [y/N] y Database "snort" dropped

[root@251ids2 Autosnort - CentOS]# mysql -u root -p -e "create database snort;" Enter password: [root@251ids2 Autosnort - CentOS]# cat /usr/src/barnyard2*/schemas/create_mysql | mysql -u root -p -D snort Enter password: ERROR 1050 (42S01) at line 193: Table 'schema' already exists [root@251ids2 Autosnort - CentOS]#

On Feb 26, 2013, at 12:59 PM, Mike Miller mike@millertwinracing.com wrote:

Interestingly, the error says /usr/src/barnyard2*/schemas/create_mysql: No such file or directory

but I can cat it: [root@251ids2 Autosnort - CentOS]# more /usr/src/barnyard2*/schemas/create_mysql :::::::::::::: /usr/src/barnyard2-1.9/schemas/create_mysql ::::::::::::::

On Feb 26, 2013, at 12:49 PM, Mike Miller mike@millertwinracing.com wrote:

  1. After running the script is there are file called barnyard2.tar.gz in /usr/src?

yes

  1. Is there a barnyard2 directory in /usr/src?

There is a barnyard2-1.9 directory

  1. Can you run this command manually and tell me whether or not it successfully downloads the .tar.gz file? wget http://www.securixlive.com/download/barnyard2/barnyard2-1.9.tar.gz -O barnyard2.tar.gz

it does.

On Feb 25, 2013, at 4:32 PM, da_667 notifications@github.com wrote:

Hey there!

thanks for reporting this issue.

Usually when this happens its because barnyard2 didn't get pulled properly from securixlive.com, the original home of BY2. I'm in the process of changing this portion of the script to pull barnyard 2 from github as opposed to securix, but in the meantime, can you check the following:

  1. After running the script is there are file called barnyard2.tar.gz in /usr/src?
  2. Is there a barnyard2 directory in /usr/src?
  3. Can you run this command manually and tell me whether or not it successfully downloads the .tar.gz file? wget http://www.securixlive.com/download/barnyard2/barnyard2-1.9.tar.gz -O barnyard2.tar.gz

The error seems to be indicating that the database schemas that are used to generate BY2's database structure aren't there. Only time I've seen this happen is when the script failed to download the .tar.gz file in question.

Thanks again!.

DA

On Mon, Feb 25, 2013 at 12:48 PM, sniglet notifications@github.com wrote:

The script asked for the Mysql root password. On entering (a possibly bad password), the script hits a loop, repeating:

./autosnort-centOS-ppinteg.sh: line 695: /usr/src/barnyard2*/schemas/create_mysql: No such file or directory the command did NOT complete successfully. (bad password?) Please try again.

as fast as the console will allow.

— Reply to this email directly or view it on GitHub< https://github.com/da667/Autosnort/issues/9>.

when does reality end? when does fantasy begin? — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/da667/Autosnort/issues/9#issuecomment-14137803 .

when does reality end? when does fantasy begin?

when does reality end? when does fantasy begin?

sniglet commented 11 years ago

Part 1:

Thanks for the additional output and time for helping to troubleshoot this. Apologies you're still having issues here.Can you answer a few questions, so that I can try to reproduce this?

  1. I'm gathering that you are running the box on CentOS based on what I see in the prompt on your system. Can you run lsb_release -a so I can determine what version of CentOS you are running?

[root@251ids2 ~]# lsb_release -a LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.3 (Final) Release: 6.3 Codename: Final [root@251ids2 ~]#

  1. Are you running the script as the root user, or via sudo?

root

  1. Can you run ls -al against /usr/src/barnyard2 ? just want to verify file permissions. Not that it should matter as root.. but just to be sure.

[root@251ids2 ~]# ls -al against /usr/src/barnyard2 ls: cannot access against: No such file or directory /usr/src/barnyard2: total 1472 drwxr-xr-x. 8 root 1000 4096 Feb 26 12:59 . drwxr-xr-x. 11 root root 4096 Feb 26 12:57 .. -rw-r--r--. 1 root 1000 36966 Dec 26 2010 aclocal.m4 -rw-r--r--. 1 root root 34 Feb 26 12:59 cflags.out -rwxr-xr-x. 1 root 1000 44959 Dec 26 2010 config.guess -rw-r--r--. 1 root root 6647 Feb 25 10:41 config.h -rw-r--r--. 1 root 1000 6213 Dec 26 2010 config.h.in -rw-r--r--. 1 root root 79801 Feb 26 12:59 config.log -rwxr-xr-x. 1 root root 60838 Feb 26 12:59 config.status -rwxr-xr-x. 1 root 1000 34597 Dec 26 2010 config.sub -rwxr-xr-x. 1 root 1000 494676 Dec 26 2010 configure -rw-r--r--. 1 root 1000 31612 Dec 26 2010 configure.in -rw-r--r--. 1 root 1000 20997 Dec 17 2009 COPYING -rw-r--r--. 1 root root 36 Feb 26 12:59 cppflags.out drwxr-xr-x. 2 root 1000 4096 Feb 26 12:59 doc drwxr-xr-x. 2 root 1000 4096 Feb 26 12:59 etc -rwxr-xr-x. 1 root 1000 13663 Dec 26 2010 install-sh -rwxr-xr-x. 1 root root 257974 Feb 26 12:59 libtool -rw-r--r--. 1 root 1000 17987 Dec 17 2009 LICENSE -rwxr-xr-x. 1 root 1000 243469 Dec 26 2010 ltmain.sh drwxr-xr-x. 2 root 1000 4096 Feb 26 12:59 m4 -rw-r--r--. 1 root root 23137 Feb 26 12:59 Makefile -rw-r--r--. 1 root 1000 174 Dec 30 2010 Makefile.am -rw-r--r--. 1 root 1000 23031 Dec 30 2010 Makefile.in -rwxr-xr-x. 1 root 1000 11419 Dec 26 2010 missing -rw-r--r--. 1 root 1000 6877 Dec 26 2010 README -rw-r--r--. 1 root 1000 11403 Dec 26 2010 RELEASE.NOTES drwxr-xr-x. 2 root 1000 4096 Feb 26 12:59 rpm drwxr-xr-x. 2 root 1000 4096 Feb 26 12:59 schemas drwxr-xr-x. 6 root 1000 4096 Feb 26 12:59 src -rw-r--r--. 1 root root 23 Feb 26 12:59 stamp-h1

  1. Can you try running the drop statement again and doing an ls -al of /var/lib/mysql, looking for any files with "snort" in the name?

[root@251ids2 ~]# mysqladmin -u root -p drop snort Enter password: Dropping the database is potentially a very bad thing to do. Any data stored in the database will be destroyed.

Do you really want to drop the 'snort' database [y/N] y Database "snort" dropped [root@251ids2 ~]# ls -al /var/lib/mysql total 20492 drwxr-xr-x. 3 mysql mysql 4096 Feb 27 10:50 . drwxr-xr-x. 30 root root 4096 Feb 25 10:29 .. -rw-rw----. 1 mysql mysql 10485760 Feb 25 10:30 ibdata1 -rw-rw----. 1 mysql mysql 5242880 Feb 25 10:30 ib_logfile0 -rw-rw----. 1 mysql mysql 5242880 Feb 25 10:30 ib_logfile1 drwx------. 2 mysql mysql 4096 Feb 25 10:30 mysql srwxrwxrwx. 1 mysql mysql 0 Feb 25 10:30 mysql.sock [root@251ids2 ~]#

It's very weird, these problems. The files are right there, and you very clearly told mysql to DROP the database in any case. Soon as I get a software version for CentOS back, I'll try to reproduce the issue here.

Email 2:

Remove and recreate the database the same way you showed me you did (DROP snort, create snort) then run this command: mysql -u root -p -D snort < /usr/src/barnyard2*/schemas/create_mysql

there should be no functional difference between the way you did and the way the script does it, but I'd rather leave no stone unturned. You know?

That's actually significant as my output the way you (and the script) suggests results in:

[root@251ids2 ~]# mysql -u root -p -D snort < /usr/src/barnyard2_/schemas/createmysql -bash: /usr/src/barnyard2/schemas/create_mysql: ambiguous redirect [root@251ids2 ~]#

sniglet commented 11 years ago

HOWEVER! The following DOES work (note the directory)

ERROR 1049 (42000): Unknown database 'snort' [root@251ids2 ~]# mysqladmin -u root -p create snort Enter password: [root@251ids2 ~]# mysql -u root -p -D snort < /usr/src/barnyard2-1.9/schemas/create_mysql Enter password: [root@251ids2 ~]#

On Feb 27, 2013, at 10:56 AM, Mike Miller mike@millertwinracing.com wrote:

Part 1:

Thanks for the additional output and time for helping to troubleshoot this. Apologies you're still having issues here.Can you answer a few questions, so that I can try to reproduce this?

  1. I'm gathering that you are running the box on CentOS based on what I see in the prompt on your system. Can you run lsb_release -a so I can determine what version of CentOS you are running?

[root@251ids2 ~]# lsb_release -a LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.3 (Final) Release: 6.3 Codename: Final [root@251ids2 ~]#

  1. Are you running the script as the root user, or via sudo?

root

  1. Can you run ls -al against /usr/src/barnyard2 ? just want to verify file permissions. Not that it should matter as root.. but just to be sure.

[root@251ids2 ~]# ls -al against /usr/src/barnyard2 ls: cannot access against: No such file or directory /usr/src/barnyard2: total 1472 drwxr-xr-x. 8 root 1000 4096 Feb 26 12:59 . drwxr-xr-x. 11 root root 4096 Feb 26 12:57 .. -rw-r--r--. 1 root 1000 36966 Dec 26 2010 aclocal.m4 -rw-r--r--. 1 root root 34 Feb 26 12:59 cflags.out -rwxr-xr-x. 1 root 1000 44959 Dec 26 2010 config.guess -rw-r--r--. 1 root root 6647 Feb 25 10:41 config.h -rw-r--r--. 1 root 1000 6213 Dec 26 2010 config.h.in -rw-r--r--. 1 root root 79801 Feb 26 12:59 config.log -rwxr-xr-x. 1 root root 60838 Feb 26 12:59 config.status -rwxr-xr-x. 1 root 1000 34597 Dec 26 2010 config.sub -rwxr-xr-x. 1 root 1000 494676 Dec 26 2010 configure -rw-r--r--. 1 root 1000 31612 Dec 26 2010 configure.in -rw-r--r--. 1 root 1000 20997 Dec 17 2009 COPYING -rw-r--r--. 1 root root 36 Feb 26 12:59 cppflags.out drwxr-xr-x. 2 root 1000 4096 Feb 26 12:59 doc drwxr-xr-x. 2 root 1000 4096 Feb 26 12:59 etc -rwxr-xr-x. 1 root 1000 13663 Dec 26 2010 install-sh -rwxr-xr-x. 1 root root 257974 Feb 26 12:59 libtool -rw-r--r--. 1 root 1000 17987 Dec 17 2009 LICENSE -rwxr-xr-x. 1 root 1000 243469 Dec 26 2010 ltmain.sh drwxr-xr-x. 2 root 1000 4096 Feb 26 12:59 m4 -rw-r--r--. 1 root root 23137 Feb 26 12:59 Makefile -rw-r--r--. 1 root 1000 174 Dec 30 2010 Makefile.am -rw-r--r--. 1 root 1000 23031 Dec 30 2010 Makefile.in -rwxr-xr-x. 1 root 1000 11419 Dec 26 2010 missing -rw-r--r--. 1 root 1000 6877 Dec 26 2010 README -rw-r--r--. 1 root 1000 11403 Dec 26 2010 RELEASE.NOTES drwxr-xr-x. 2 root 1000 4096 Feb 26 12:59 rpm drwxr-xr-x. 2 root 1000 4096 Feb 26 12:59 schemas drwxr-xr-x. 6 root 1000 4096 Feb 26 12:59 src -rw-r--r--. 1 root root 23 Feb 26 12:59 stamp-h1

  1. Can you try running the drop statement again and doing an ls -al of /var/lib/mysql, looking for any files with "snort" in the name?

[root@251ids2 ~]# mysqladmin -u root -p drop snort Enter password: Dropping the database is potentially a very bad thing to do. Any data stored in the database will be destroyed.

Do you really want to drop the 'snort' database [y/N] y Database "snort" dropped [root@251ids2 ~]# ls -al /var/lib/mysql total 20492 drwxr-xr-x. 3 mysql mysql 4096 Feb 27 10:50 . drwxr-xr-x. 30 root root 4096 Feb 25 10:29 .. -rw-rw----. 1 mysql mysql 10485760 Feb 25 10:30 ibdata1 -rw-rw----. 1 mysql mysql 5242880 Feb 25 10:30 ib_logfile0 -rw-rw----. 1 mysql mysql 5242880 Feb 25 10:30 ib_logfile1 drwx------. 2 mysql mysql 4096 Feb 25 10:30 mysql srwxrwxrwx. 1 mysql mysql 0 Feb 25 10:30 mysql.sock [root@251ids2 ~]#

It's very weird, these problems. The files are right there, and you very clearly told mysql to DROP the database in any case. Soon as I get a software version for CentOS back, I'll try to reproduce the issue here.

Email 2:

Remove and recreate the database the same way you showed me you did (DROP snort, create snort) then run this command: mysql -u root -p -D snort < /usr/src/barnyard2*/schemas/create_mysql

there should be no functional difference between the way you did and the way the script does it, but I'd rather leave no stone unturned. You know?

That's actually significant as my output the way you (and the script) suggests results in:

[root@251ids2 ~]# mysql -u root -p -D snort < /usr/src/barnyard2_/schemas/createmysql -bash: /usr/src/barnyard2/schemas/create_mysql: ambiguous redirect [root@251ids2 ~]#