Log into the MySQL core using the root account (it will ask you for the password, which is "hda" in Amahi 7)
{{Code| mysql -uroot -p}}
Create the user "xbmc"
{{Code| CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';}}
Create the databases "xbmc_video" and "xbmc_music"
{{Code| CREATE database xbmc_video; CREATE database xbmc_music;}}
Grant the user "xbmc" access to these databases
{{Code| GRANT ALL ON xbmc_music.* TO 'xbmc'@'localhost' identified by 'xbmc'; GRANT ALL ON xbmc_video.* TO 'xbmc'@'localhost' identified by 'xbmc';}}
Make sure the MySQL knows the changes made
{{Code| flush privileges;}}
Now to have XMBC make use of the MySQL databases:
{{Code|<pre>cat > /home/xbmcuser/.xbmc/userdata/advancedsettings.xml << 'EOF'
<advancedsettings>
<videodatabase>
</musicdatabase>
</advancedsettings>
EOF}}</pre>
Done! Restart XBMC to enable the new settings.