[mythtv] [GitHub] Set the default DB port to 3306 instead of making '0' mean default. [MythTV/mythtv 859ad36]

Michael T. Dean mtdean at thirdcontact.com
Thu Apr 14 21:12:17 UTC 2011


On 04/14/2011 05:07 PM, Robert Kulagowski wrote:
> On Thu, Apr 14, 2011 at 2:29 PM, Michael T. Dean wrote:
>> Robert, FWIW, if you remove the conditional at:
>>
>> https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/mythdbcon.cpp#L126
>>
>> does everything work properly?
> Sorry, which conditional?  Whack the entire section marked by ascii arrows?
>
>          if (m_dbparms.dbPort)
>              m_db.setPort(m_dbparms.dbPort);
>
> ->         if (m_dbparms.dbPort&&  m_dbparms.dbHostName == "localhost")
> ->             m_db.setHostName("127.0.0.1");
>
>          connected = m_db.open();


Exactly.  We really don't need that logic--users wanting to use TCP/IP 
on *nix can just specify an IP address (127.0.0.1 or their host's 
routable IP address).  We shouldn't be "auto-correcting" it for them 
(especially since one car argue that it's not a very correct 
configuration--and it's /definitely/ not the configuration the user 
specified).

> Here's the privileges now for the mythtv user (as per the mc.sql setup)
>
> mysql>  show grants;
> +---------------------------------------------------------------------------------------------------------------+
> | Grants for mythtv at localhost
>                                           |
> +---------------------------------------------------------------------------------------------------------------+
> | GRANT USAGE ON *.* TO 'mythtv'@'localhost' IDENTIFIED BY PASSWORD
> '<deleted>' |
> | GRANT ALL PRIVILEGES ON `mythconverg`.* TO 'mythtv'@'localhost'
>                                           |
> +---------------------------------------------------------------------------------------------------------------+
> 2 rows in set (0.00 sec)

Yeah, looking like this should fix the issue for you.

Thanks,
Mike


More information about the mythtv-dev mailing list