Error in mythconverg_init.sql

For discussion of topics specific to MythTV on OSX
Post Reply
sfatula
Senior
Posts: 163
Joined: Sun Aug 09, 2015 3:51 am
Location: Calera, OK
United States of America

Error in mythconverg_init.sql

Post by sfatula »

I think this is OSX specific. In this file, is this line:

Code: Select all

GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@"&" IDENTIFIED BY "mythtv";
Marriadb seems to accept it too. That's strange, near as I can tell and have always be taught, the only valid wildcard in the grant statement is %. Just reviewed the MySQL 5.5 doc and it says this as well. MySQL Workbench rejects & as a syntax error.

Not sure what the intent of this statement was though. The grant alls before it clearly give temporary access to mythtv user.
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Error in mythconverg_init.sql

Post by pvr4me »

My database setup script is adapted from:

https://www.mythtv.org/wiki/Myth_on_Mac ... racter_Set

My intent was that any machine on the local network should be allowed access. I think you are correct, however that it should have "%" instead of "&".

I never questioned whether the grant for temp tables was necessary or not. The standard (single machine) init supplied with Myth has included a separate grant for years. That script hasn't been changed since 2008!

https://github.com/MythTV/mythtv/blob/f ... ase/mc.sql

I bow to those with more knowledge of sql than me!

Craig
Formerly the MacPorts guy.
sfatula
Senior
Posts: 163
Joined: Sun Aug 09, 2015 3:51 am
Location: Calera, OK
United States of America

Re: Error in mythconverg_init.sql

Post by sfatula »

It doesn't matter, a separate grant for temporary tables is fine, MySQL can always change the defaults I suppose as far as what grant ALL means. Grant ALL does not grant grant privileges for example, so it's never ben all anyway! So, extra one is ok. Just correct the syntax. On mariadb 5.5, grant ALL does provide temporary tables privilege. I see the original on github, and, it only allows local access, not LAN access. So, the intent is good.

So, change to % instead of & and it will be fine.

Sorry, was just perusing the schema in MySQL workbench when I saw the syntax error. Real impact = none!
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Error in mythconverg_init.sql

Post by pvr4me »

OK. AFAICT, the 'grant create temporary tables' command--in addition to being syntactically wrong--is also redundant. I'll push a change through shortly and see how it works out.

Craig
Formerly the MacPorts guy.
Post Reply