TVServer Configuration - Database credentials forces root rights (1 Viewer)

Bitboy

New Member
November 24, 2013
2
0
38
Home Country
Germany Germany
In a setting where a user has already a running MySQL Service (e.g. a XAMP installation), there are two issues to deal with.

1. "localhost" and "127.0.0.1" are not accepted as hostname (why?).

2. Every time the program seems to check if the given account has rights to access the "mysql" database on the server. If not the "Setup Database" windows is shown.

To fix this you need to give MediaPortal root rights to the database and additionally (because of 1.) allow root login from all hosts. This is a bad security design.
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello and welcome Bitboy :)

    1. "localhost" and "127.0.0.1" are not accepted as hostname (why?).
    https://forum.team-mediaportal.com/threads/ms-sql-and-mysql-errors-on-install.121050/#post-1021940
    https://forum.team-mediaportal.com/threads/mysql-hostname-localhost.48692/#post-882294

    MP won't accept localhost because localhost is ambiguous or incorrect in some valid MP configurations. Consider the situation where you have the database and TV Server on one machine (ie. server-only or standalone install) and are trying to use TV via MediaPortal installed on another PC or laptop (ie. a client-only install). MediaPortal on the client talks directly to the database in some situations. It receives the DB connection details from the server. If you've configured the DB connection with "localhost" then that works fine on the server because the database is running on the same machine (ie. definition of localhost is "on this machine"). However, it won't work for the client because when the client attempts to connect to the DB with "localhost" it will be looking for the DB on that local client PC... which is of course wrong. Hence we block configuration using localhost.

    2. Every time the program seems to check if the given account has rights to access the "mysql" database on the server. If not the "Setup Database" windows is shown.

    To fix this you need to give MediaPortal root rights to the database and additionally (because of 1.) allow root login from all hosts. This is a bad security design.
    We don't force anybody to use the root user or allocate root rights. It is the default because most people don't use the database for anything other than MediaPortal and because they don't know how to create a user with the required privileges. If you or anybody else have more sensitive data in an existing database then it is expected you would know how to configure a database user and would do so if desired. So, simply create a user with the required privileges. The user would need all privileges on the MpTvDb schema (or whatever you decide to call the MP TV Server schema), and "SELECT" on the information schema and mysql schemas.

    mm
     

    Bitboy

    New Member
    November 24, 2013
    2
    0
    38
    Home Country
    Germany Germany
    Hello :)

    Thx for your explanation. I only installed the server part because i wanted to use XBMC as client, so it wasn't obvious that this setting is shared between the server and the client.

    Giving only select rights to a newly created user helped, thx for this info. Maybe a note in the documentation http://wiki.team-mediaportal.com/1_MEDIAPORTAL_1/15_Customization/TV-Server/SQL_Server/MySQL would help people like me, in the current version it looks like that only root (rights) are working.

    Topic can be closed.
     

    Users who are viewing this thread

    Top Bottom