MySQL/Portable devices and profiles: Difference between revisions
No edit summary |
No edit summary |
||
Line 43: | Line 43: | ||
{{ | == 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: | |||
<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> | |||
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). | |||
{{Updated|16}} |
Revision as of 09:23, 19 July 2016
Share libraries w/MySQL, guide: |
MySQL | Portable devices and profiles |
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
- Configure the Master User profile:
- Open the Profile settings
- Modify the Master User profile
- Rename the profile, for example "Portable"
- Configure the Second profile:
- Create a new profile
- Enter a name for the second profile, for example "Home"
- Accept the default profile path
- Select "Separate" for "Media info" and "Media sources"
- 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:
<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>
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).