Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Fri Mar 29, 2024 5:02 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 
Author Message
PostPosted: Tue Jul 25, 2006 6:01 am 
Offline
Moderator

Joined: Wed Apr 26, 2006 3:20 am
Posts: 119
Right now the ui for setup is confusing as it doesn't inform the user that it isn't creating the necessasry db tables on it's own (as is standard with most drop in applications like this).

This could be solved by loading the sql, or by giving users instructions to now go load the sql on their own.

~ Anders


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jul 25, 2006 6:15 am 
It creates the db tables for me. Did create a new database? I passed it a db name that didn't exist yet.


Top
  
Reply with quote  
 Post subject:
PostPosted: Tue Jul 25, 2006 7:03 am 
Offline
Moderator

Joined: Wed Apr 26, 2006 3:20 am
Posts: 119
Hmmm...I was using a pre-existing db I created so that I could create a seperate [mysql] user for open-audit. I wonder if it's got a simple "does this db exist" check at the beginning.

~ Anders


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jul 25, 2006 9:22 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
It does next to no checking ATM.
Best to setup a "new" install, in a new DB.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jul 25, 2006 9:28 am 
Offline
Moderator

Joined: Wed Apr 26, 2006 3:20 am
Posts: 119
right... so it was a "new" db in that I had made it seconds earlier. But it was pre-existing in that I usualy make a new db, add it's apropriate user, pass that user and db to the scripts that want to generate stuff (this way I don't start installing something and realise the author has a silly bug that wipes out more than it should).

~ Anders


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jul 25, 2006 9:56 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
The setup script should work with either a created database, or not. As long as the user you use can create one.

If the database is already there, it will remove then create the tables (as per the open_audit.sql file in the scripts directory.

If the database is not there, as long as the user can create it, it should create the database, then proceed as per the step above.

It creates the DB on line ~146 (on my setup.php). It should error out, if it can't create it.

What errors are displayed ?

I'll try a new user, without a DB, too....

Mark.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jul 25, 2006 10:23 am 
Offline
Moderator

Joined: Wed Apr 26, 2006 3:20 am
Posts: 119
I didn't get any errors, It reported success but didn't create any tables. I then went in as the user and added the sql directly and that worked fine (so I know the user has the proper privs).

~ Anders


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jul 25, 2006 11:22 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
This has to do with user permissions.
When run as root - all OK.
When run as a user, the user must have "create database" permission (if the database doesn't exist).
The user must also have "RELOAD" permission, this is due to "OLD Password" needing to be set.
I shall do up a FAQ, about how to setup MySQL with a user, and a database, and old passwords being set. I can then remove the Flush Privileges statement.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jul 25, 2006 11:23 am 
Offline
Moderator

Joined: Wed Apr 26, 2006 3:20 am
Posts: 119
I'll try adding reload priv's tommorrow and see what happens.

~ Anders


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jul 25, 2006 12:05 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
I have altered setup.php and removed the code that doesn't run without "root".
This means that MySQL will have to be manually setup.
There is now a FAQ for this - check the FAQ section.
I think this is the safest option - using root = bad.....
(do as I say, not as I do !!!)

Mark.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group