Jayad / enterprise-log-search-and-archive

Automatically exported from code.google.com/p/enterprise-log-search-and-archive
0 stars 0 forks source link

set_web_mysql fails #180

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Run sudo sh -c "sh install.sh node && sh install.sh web"
2.  get error with mysql
3.

What is the expected output? What do you see instead?

Executing set_web_mysql
ERROR 1049 (42000): Unknown database 'elsa_web'
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
set_web_mysql FAIL

What version of the product are you using? On what operating system?
install.sh 1.5, Ubuntu 12.0.4

Please provide any additional information below.
root password has been added into the install.sh file.

Original issue reported on code.google.com by digital...@gmail.com on 22 Oct 2013 at 10:47

GoogleCodeExporter commented 9 years ago
I created a test script to get this to work:

MYSQL_HOST="localhost"
MYSQL_PORT="3306"
MYSQL_DB="elsa_web"
MYSQL_USER="elsa"
MYSQL_PASS="biglog"
MYSQL_ROOT_USER="root"
MYSQL_ROOT_PASS="123456"
MYSQL_PASS_SWITCH="-p$MYSQL_ROOT_PASS"

mysqladmin "-h$MYSQL_HOST" "-P$MYSQL_PORT" -u$MYSQL_ROOT_USER 
$MYSQL_PASS_SWITCH create $MYSQL_DB &&
        mysql "-h$MYSQL_HOST" "-P$MYSQL_PORT" -u$MYSQL_ROOT_USER $MYSQL_PASS_SWITCH -e "GRANT ALL ON $MYSQL_DB.* TO \"$MYSQL_USER\"@\"localhost\" IDENTIFIED BY \"$MYSQL_PASS\"" &&
        mysql "-h$MYSQL_HOST" "-P$MYSQL_PORT" -u$MYSQL_ROOT_USER $MYSQL_PASS_SWITCH -e "GRANT ALL ON $MYSQL_DB.* TO \"$MYSQL_USER\"@\"%\" IDENTIFIED BY \"$MYSQL_PASS\"" &&
        mysql "-h$MYSQL_HOST" "-P$MYSQL_PORT" "-u$MYSQL_USER" "-p$MYSQL_PASS" $MYSQL_DB -e "source /usr/local/elsa/web/conf/meta_db_schema.mysql"

This works.  Now, not related to this, however, I'm greeted with:

Executing validate_config
Invalid dir: config_file
Invalid configuration: invalid: sphinx/config_file
Config is invalid: sphinx/config_file
validate_config FAIL

from the validate_config.pl:
my $config_file = -f '/etc/elsa_web.conf' ? '/etc/elsa_web.conf' : 
'/usr/local/elsa/web/conf/elsa.conf';
if ($ENV{ELSA_CONF}){
        $config_file = $ENV{ELSA_CONF};
}
elsif ($Opts{c}){
        $config_file = $Opts{c};
}

Both these files exist.  I'm giving up on using elsa...thanks anyways.

Original comment by digital...@gmail.com on 23 Oct 2013 at 4:00

GoogleCodeExporter commented 9 years ago
If you add MYSQL_ROOT_PASS="123456" to /etc/elsa_vars.sh, the install should 
work.  The install.sh file should not be edited because it gets changed at each 
install step to allow for updates to the install.sh file itself.

Original comment by mchol...@gmail.com on 24 Oct 2013 at 1:22