Re: Choosing a "non-standard" database name?
jjs - mainphrame <[email protected]>
| Newsgroups | gmane.mail.virus.maiamailguard |
|---|---|
| Message-ID | <CABkzw7zzwmYEPK4i8YPofsf+trQMw6bjMhiLaVH7Yo69ZTJ80A@mail.gmail.com> |
RPM, interesting idea. Feel free to make debs too, if you get a chance. Jake On Wed, May 6, 2020 at 1:36 PM Derek Atkins <[email protected]> wrote: > Looking more closely and the 'grants-*' scripts, while they hardcode > database 'maia', they also hardcode client name "@localhost". So there > you go ;) > > That certainly makes it easier. A small update to get-info.sh to ask for > the database name (defaulting to 'maia'), update the config templates, and > that's *probably* all we need. > > Next we just need to get all this into an RPM ;) > > -derek > > On Wed, May 6, 2020 4:01 pm, jjs - mainphrame wrote: > > It only tries to create the DB if it's local. If it's remote, it assumes > > the DB already exists. > > > > That's the case here, maia boxes come and go, but the db server remains. > > > > Jake > > > > > > > > > > On Wed, May 6, 2020 at 12:57 PM Derek Atkins <[email protected]> wrote: > > > >> Cool! I figured it would work with updated configs. So it's just an > >> installer update. I started looking at what it would take -- I was only > >> going to allow it if you chose a non-local DB server. But I haven't > >> made > >> any changes yet. > >> > >> If you run a non-local DB, does the installer still try to run the SQL > >> init code? I didn't get that far. I only ask because that SQL does > >> hard-code "maia" DB name. > >> > >> -derek > >> > >> On Wed, May 6, 2020 3:47 pm, jjs - mainphrame wrote: > >> > Yeah, I thought so too. Corrected a dns issue, and it's fast now. So > >> > fedora > >> > 32 is looking like one of the best platforms I've seen for maia. > >> > > >> > Now, I just have to find the time to modify the installer to do the > >> right > >> > thing about the database name. > >> > > >> > Jake > >> > > >> > On Wed, May 6, 2020 at 12:44 PM Derek Atkins <[email protected]> wrote: > >> > > >> >> That looks like a failed DNS lookup and/or failed IPv6 attempt? > >> >> > >> >> Can you run the mysqladmin under strace on F32 to see what it's doing > >> >> for > >> >> those 5 seconds? > >> >> > >> >> -derek > >> >> > >> >> On Wed, May 6, 2020 3:38 pm, jjs - mainphrame wrote: > >> >> > As a preliminary check, the fedora instance here is able to use a > >> >> database > >> >> > called "maia1" (and by induction, any arbitrary name), with changes > >> to > >> >> the > >> >> > 3 config files - maia.conf, maiad.conf and config.php. > >> >> > > >> >> > One thing that I can't figure out, and maybe a fedora guru can shed > >> >> > some light, is that fedora is taking an extra 5 seconds to interact > >> >> with > >> >> > the remote database server, and I'm not sure what system setting > >> could > >> >> be > >> >> > causing that. > >> >> > > >> >> > From Centos 8: > >> >> > $ time mysqladmin status -h dbserv -u test -ptest > >> >> > Uptime: 2257483 Threads: 7 Questions: 252508 Slow queries: 0 > >> >> Opens: > >> >> 99 > >> >> > Flush tables: 1 Open tables: 93 Queries per second avg: 1.11 > >> >> > > >> >> > real 0m0.009s > >> >> > user 0m0.001s > >> >> > sys 0m0.006s > >> >> > > >> >> > From Fedora 32: > >> >> > $ time mysqladmin status -h dbserv -u test -ptest > >> >> > Uptime: 2257557 Threads: 7 Questions: 252511 Slow queries: 0 > >> >> Opens: > >> >> 99 > >> >> > Flush tables: 1 Open tables: 93 Queries per second avg: 1.11 > >> >> > > >> >> > real 0m5.009s > >> >> > user 0m0.002s > >> >> > sys 0m0.003s > >> >> > > >> >> > Jake > >> >> > > >> >> > On Mon, May 4, 2020 at 6:45 PM jjs - mainphrame > >> <[email protected]> > >> >> > wrote: > >> >> > > >> >> >> If you do dive in, be sure and start with the latest version of > >> the > >> >> >> repo. > >> >> >> It's getting updates pretty much every day. > >> >> >> > >> >> >> Jake > >> >> >> > >> >> >> On Mon, May 4, 2020 at 8:38 AM Derek Atkins <[email protected]> > >> wrote: > >> >> >> > >> >> >>> Indeed. I'll see if I have time to look at it myself. > >> >> >>> I think there are a few more than 3 places, but hopefully less > >> than > >> >> 6. > >> >> >>> Certainly the get-info.sh needs to be updated, but so do the SQL > >> >> >>> scripts > >> >> >>> and scripts that generate the config files. > >> >> >>> Hopefully I can find the time. WAY too much going on. > >> >> >>> > >> >> >>> -derek > >> >> >>> > >> >> >>> On Mon, May 4, 2020 11:32 am, jjs - mainphrame wrote: > >> >> >>> > Lots going on this week, so we'll see > >> >> >>> > > >> >> >>> > I'm hoping it's mostly in 3 config files, but a search will > >> tell. > >> >> >>> > > >> >> >>> > Jake > >> >> >>> > > >> >> >>> > > >> >> >>> > > >> >> >>> > On Mon, May 4, 2020 at 7:53 AM Derek Atkins <[email protected]> > >> >> wrote: > >> >> >>> > > >> >> >>> >> Of course, there are 2772 instances of the 4-tuple "maia" that > >> I > >> >> >>> will > >> >> >>> >> need > >> >> >>> >> to check through to ensure I get all places! > >> >> >>> >> > >> >> >>> >> Fun. (unless you volunteer to do this for me ;) > >> >> >>> >> > >> >> >>> >> -derek > >> >> >>> >> > >> >> >>> >> On Mon, May 4, 2020 10:45 am, jjs - mainphrame wrote: > >> >> >>> >> > That doesn't seem unreasonable. > >> >> >>> >> > > >> >> >>> >> > Jake > >> >> >>> >> > > >> >> >>> >> > On Mon, May 4, 2020 at 7:27 AM Derek Atkins > >> <[email protected]> > >> >> >>> wrote: > >> >> >>> >> > > >> >> >>> >> >> Hi, > >> >> >>> >> >> > >> >> >>> >> >> jjs - mainphrame <[email protected]> writes: > >> >> >>> >> >> > >> >> >>> >> >> > You can send them by email here, or add it to the issue > >> on > >> >> the > >> >> >>> >> repo. > >> >> >>> >> >> > > >> >> >>> >> >> > Jake > >> >> >>> >> >> > >> >> >>> >> >> One thing I noticed is that there is a hard-coded > >> dependency > >> >> on > >> >> >>> the > >> >> >>> >> >> database *name* of "maia". I was planning to install this > >> >> >>> along-side > >> >> >>> >> my > >> >> >>> >> >> older (1.0.2a) maia installation (same DB server, although > >> >> >>> different > >> >> >>> >> >> mail hosts). I would rather be able to name the *new* > >> >> database > >> >> >>> >> >> something other that "maia", rather than trying to rename > >> the > >> >> >>> >> existing, > >> >> >>> >> >> live database. > >> >> >>> >> >> > >> >> >>> >> >> I suppose I could do the manual install, following the > >> fedora > >> >> >>> model, > >> >> >>> >> but > >> >> >>> >> >> would you accept a PR that lets one choose the database > >> name? > >> >> In > >> >> >>> my > >> >> >>> >> >> case, I want to set it to "maia1". > >> >> >>> >> >> > >> >> >>> >> >> -derek > >> >> >>> >> >> > >> >> >>> >> >> -- > >> >> >>> >> >> Derek Atkins 617-623-3745 > >> >> >>> >> >> [email protected] www.ihtfp.com > >> >> >>> >> >> Computer and Internet Security Consultant > >> >> >>> >> >> > >> >> >>> >> > > >> >> >>> >> > >> >> >>> >> > >> >> >>> >> -- > >> >> >>> >> Derek Atkins 617-623-3745 > >> >> >>> >> [email protected] www.ihtfp.com > >> >> >>> >> Computer and Internet Security Consultant > >> >> >>> >> > >> >> >>> >> > >> >> >>> > > >> >> >>> > >> >> >>> > >> >> >>> -- > >> >> >>> Derek Atkins 617-623-3745 > >> >> >>> [email protected] www.ihtfp.com > >> >> >>> Computer and Internet Security Consultant > >> >> >>> > >> >> >>> > >> >> > > >> >> > >> >> > >> >> -- > >> >> Derek Atkins 617-623-3745 > >> >> [email protected] www.ihtfp.com > >> >> Computer and Internet Security Consultant > >> >> > >> >> > >> > > >> > >> > >> -- > >> Derek Atkins 617-623-3745 > >> [email protected] www.ihtfp.com > >> Computer and Internet Security Consultant > >> > >> > > > > > -- > Derek Atkins 617-623-3745 > [email protected] www.ihtfp.com > Computer and Internet Security Consultant > > _______________________________________________ Maia-users mailing list [email protected] http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users