Russell-IO / php-syslog-ng

Automatically exported from code.google.com/p/php-syslog-ng
1 stars 0 forks source link

Installation creating users local to mysql DB, not to the local Logs server #154

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Install logzilla_2.9.9o on a server and use a remote mysql DB
2.  During install note that the users created on the mysql DB grant
privileges to the user@'mysqldb' and drop any other syslog users already
created
3.  After installation searching works but the screen is filled with DB
errors, and the reloadcache function via the button does not work properly.

What is the expected output? What do you see instead?
Expecting normal screens but seeing many errors such as:

Error in "function perform_query()"
Mysql_error: Got error 28 from storage engine
Query was: DESCRIBE logs

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in /var/www/logzilla_2.9.9o/html/includes/common_funcs.php on line 415
Error in "function perform_query()"
Mysql_error: Got error 28 from storage engine
Query was: DESCRIBE actions
...

What version of the product are you using? On what operating system?
2.9.9o on RHEL4 x64 using remote MySQL5.1.39, also seeing on an RHEL5
system vs. Mysql5.0.

Please provide any additional information below.
Installing logzilla on Server01, Mysql DB on Database01.  During install I:

1.  create a new DB called syslog on Database01.
2.  (optionally) create users and grant all on syslog.* to syslogadmin and
sysloguser @ 'Server01' 
3.  Extract the tgz, set permissions and run the web installer on Server01
specifying remote DB to be Database01.
4.  Step 1 - specify Database01 and set the user passwords
5.  Proceed through Step2/3. 

> At this point I can see that the users I created have been dropped and 2
new users have been created 'sysloguser' and 'syslogadmin' @ 'Database01'.
 As such the user's on Server01 don't have permissions to run the CEMDB
install.  Even if I add the proper 2 users back I still get errors such as
shown above on each screen.

Kinda scary that the install is dropping users at all imo but I'm assuming
it's limited to those named sysloguser/admin.  And no big deal but even if
I uncheck the 'install CEMDB' option I'm still prompted for Step4 with no
link directly to the login screen.

Thanks.

Original issue reported on code.google.com by PSESm...@gmail.com on 12 Nov 2009 at 1:56

GoogleCodeExporter commented 9 years ago
Hmm,
I don't have a way to test a remote mysql db, so that may be the issue.
If you want, just skip the CEMDB import and import from the command line:
cd logzilla/install/sql
mysql syslog < cemdb.sql
Also, if it is dropping any users, it's only the "sysloguser" and "syslogadmin" 
users.
Please let me know if this helps - if not, I'll try to schedule some time to 
work
1on1 with you on it.

Original comment by cdu...@gmail.com on 13 Nov 2009 at 10:58

GoogleCodeExporter commented 9 years ago
Thanks Clayton, you've been very helpful several times now, for logzilla and
syslog-ng, and I appreciate it.  It turns out the cause of the 'error 28 from 
storage
engine' mysql errors were a result of insufficient disk space on the mysql 
server. 
The DB had grown quickly and a backup script was recently added to do a daily 
dmp of
all DBs.  I didn't realize there was a space issue as it kept letting me 
drop/create
the DB and there weren't any obvious performance issues on the server.

As for the users part it is indeed hardcoding localhost when doing the install. 
 Once
I got over the first issue I can just readd my remote users and give them 
permissions
before doing the Step 4 CEMDB install and everything works ok.  Just before I 
did
that I grep'ed for localhost and see it in a few places which maybe should be 
set to
use DBHOST from config.php:

./html/install/cemdb/bigdump.php:$db_server   = 'localhost';
./html/install/install1.php:$DBhostname = mosGetParam( $_POST, 'DBhostname',
'localhost' );
./html/install/install1.php:                                            
<td><em>This
is usually 'localhost'</em></td>
./html/includes/database.php:   function database( $host='localhost', $user, 
$pass,
$db, $table_prefix ) {

Cheers.

Original comment by PSESm...@gmail.com on 15 Nov 2009 at 12:13

GoogleCodeExporter commented 9 years ago
Problem will be solved in the new version - I'm doing away with the web install 
and
going to a perl-based install. Much easier to control and fix ;-)

Original comment by cdu...@gmail.com on 21 Nov 2009 at 3:16