MySQL/Portable devices and profiles: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
m (→‎Configure the MySQL profile: {{kodi}} name changes)
mNo edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{:MySQL/Contents}}
{{:MySQL/Contents}}
{{mininav| [[MySQL]] }}
{{mininav| [[MySQL]] }}
{{see also|Profiles}}
== Portable devices ==
If you use your device (notebook or mobile iOS device) in multiple situations, you can create multiple profiles. You can use one profile at home, using a central MySQL database and another profile for use when travelling.  
If you use your device (notebook or mobile iOS device) in multiple situations, you can create multiple profiles. You can use one profile at home, using a central MySQL database and another profile for use when travelling.  


First create two profiles. Configure one profile for "local use" (internal HDD only, while traveling, etc) and another for using a central database. You can even make profiles for different wifi networks that have different centralized databases (your home, a friend's home, etc).
First create two profiles. Configure one profile for "local use" (internal HDD only, while traveling, etc) and another for using a central database. You can even make profiles for different wifi networks that have different centralized databases (your home, a friend's home, etc).


== Create profiles ==
{{divbox|red||'''Note:''' Path substition for "sources" and profiles is broken, and will '''NOT''' be fixed.}}
 
=== Create profiles ===
{{main|Profiles}}
{{main|Profiles}}
#Configure the Master User profile:
#Configure the Master User profile:
Line 18: Line 24:
# Enable the login screen to select a profile on startup
# Enable the login screen to select a profile on startup


== Configure the MySQL profile ==
=== Configure the MySQL profile ===
Create a new file "advancedsettings.xml" in [[userdata]]/profiles/<username>/:
Create a new file "advancedsettings.xml" in [[userdata]]/profiles/<username>/:
<pre><nowiki>
<pre><nowiki>
Line 40: Line 46:
</nowiki></pre>
</nowiki></pre>


See [[MySQL/Setting up XBMC|Setting up XMBC]] for more information.
See [[MySQL/Setting up Kodi|Setting up Kodi]] for more information.
 
== Using different MySQL servers per profile ==
Each profile acts as a different set of Kodi settings, and can have their own advancedsettings.xml file. By setting up either different MySQL servers, or a single MySQL server with different database names, each profile can point to a different MySQL library.
 
For example:
 
Create a new file "advancedsettings.xml" in [[userdata]]/profiles/<username>/:
<pre><nowiki>
<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>***.***.***.***</host>
        <name>Bob</name>
        <port>3306</port>
        <user>kodi</user>
        <pass>kodi</pass>
    </videodatabase>
 
    <musicdatabase>
        <type>mysql</type>
        <host>***.***.***.***</host>
        <name>Bob</name>
        <port>3306</port>
        <user>kodi</user>
        <pass>kodi</pass>
    </musicdatabase>
</advancedsettings>
</nowiki></pre>


By using the <code><name></code>-tags this advancedsettings.xml file will point to a database with a "Bob" prefix name, instead of the default "myvideos" or "mymusic" prefix (these are used when the name tag is excluded). Other Kodi installations or profiles that use the Bob name will all be pointing to the same MySQL database (assuming all are using the same Kodi version).


{{Gotham updated}}
{{Updated|18}}

Latest revision as of 10:22, 11 October 2018

Share libraries w/MySQL, guide:

  1. Introduction
  2. Setting up MySQL
  3. Setting up Kodi
Home icon grey.png   ▶ MySQL ▶ Portable devices and profiles

Portable devices

If you use your device (notebook or mobile iOS device) in multiple situations, you can create multiple profiles. You can use one profile at home, using a central MySQL database and another profile for use when travelling.

First create two profiles. Configure one profile for "local use" (internal HDD only, while traveling, etc) and another for using a central database. You can even make profiles for different wifi networks that have different centralized databases (your home, a friend's home, etc).

Create profiles

  1. Configure the Master User profile:
    1. Open the Profile settings
    2. Modify the Master User profile
    3. Rename the profile, for example "Portable"
  2. Configure the Second profile:
    1. Create a new profile
    2. Enter a name for the second profile, for example "Home"
    3. Accept the default profile path
    4. Select "Separate" for "Media info" and "Media sources"
  3. Enable the login screen to select a profile on startup

Configure the MySQL profile

Create a new file "advancedsettings.xml" in userdata/profiles/<username>/:

<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>***.***.***.***</host>
        <port>3306</port>
        <user>kodi</user>
        <pass>kodi</pass>
    </videodatabase> 

    <musicdatabase>
        <type>mysql</type>
        <host>***.***.***.***</host>
        <port>3306</port>
        <user>kodi</user>
        <pass>kodi</pass>
    </musicdatabase>
</advancedsettings>

See Setting up Kodi for more information.

Using different MySQL servers per profile

Each profile acts as a different set of Kodi settings, and can have their own advancedsettings.xml file. By setting up either different MySQL servers, or a single MySQL server with different database names, each profile can point to a different MySQL library.

For example:

Create a new file "advancedsettings.xml" in userdata/profiles/<username>/:

<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>***.***.***.***</host>
        <name>Bob</name>
        <port>3306</port>
        <user>kodi</user>
        <pass>kodi</pass>
    </videodatabase> 

    <musicdatabase>
        <type>mysql</type>
        <host>***.***.***.***</host>
        <name>Bob</name>
        <port>3306</port>
        <user>kodi</user>
        <pass>kodi</pass>
    </musicdatabase>
</advancedsettings>

By using the <name>-tags this advancedsettings.xml file will point to a database with a "Bob" prefix name, instead of the default "myvideos" or "mymusic" prefix (these are used when the name tag is excluded). Other Kodi installations or profiles that use the Bob name will all be pointing to the same MySQL database (assuming all are using the same Kodi version).