[mythtv-users] Q about users and priveleges...?
Nick Morrott
knowledgejunkie at gmail.com
Mon Jan 26 22:17:03 UTC 2009
On 26/01/2009, A JM <vbtalent at gmail.com> wrote:
> "The MySQL user account you use to connect to the MythTV database (and
> whose details appear in mysql.txt) is separate to the Linux user
> account you run mythbackend/mythfrontend as."
>
> So, just add a user 'sudo adduser myuser' and then add the mysql.txt file
> into the .mythtv folder as well as make sure that user has been added to the
> DB (http://www.mythtv.org/wiki/Ubuntu-8.10_Source_Install)
>
> mysql -u root -p
> create database mythconverg;
If the database already exists in mysql, do not try to recreate it.
> set password for 'myuser'@'%' = password('myuser');
> set password for 'myuser'@'localhost' = password('myuser');
You will probably need to grant privileges for these user/host pair to
access/edit the mythconverg database (see below)
> flush privileges;
>
> and that will allow me to continue to run the backend/frontend as my
> "regular" user without problem.
If you already have a working _mysql_ user that can access the
mythconverg database, you can use this - you just need to include
those details in the mysql.txt/config.xml file. These are not the
username/password of your Linux system user.
If you want to use a different mysql username to access the database,
you will need to grant suitable mysql privileges to that mysql user
whilst logged in to mysql as the root mysql user (or one with grant
privileges).
Something like the following (example taken from bottom of
http://www.mythtv.org/wiki/MythFrontend) is what you are looking for:
$ mysql -u root -p mysql
mysql> grant all on mythconverg.* to 'username'@'%' identified by 'password';
mysql> flush privileges;
mysql> exit;
Change the username/password placeholders for the actual username and
password you want to use, place these same values in your mysql.txt
file, and you can access the mythconverg user as that _mysql_ user.
(You may need to repeat the grant statement for host 'localhost'.)
> Are there reasons for making them the same?
Simplicity and to avoid questions like this probably!
Nick
--
Nick Morrott
MythTV Official wiki:
http://mythtv.org/wiki/
MythTV users list archive:
http://www.gossamer-threads.com/lists/mythtv/users
"An investment in knowledge always pays the best interest." - Benjamin Franklin
More information about the mythtv-users
mailing list