Book Image

Raspberry Pi Media Center

By : Sam Nazarko
Book Image

Raspberry Pi Media Center

By: Sam Nazarko

Overview of this book

<p>Low-cost and high-performing, with a massively diverse range of uses and applications, the Raspberry Pi is set to revolutionize the way we think about computing and programming. Using it as a Media Center allows everyone to have a low-cost device that is always on, attached to their TV. <br /><br />Imagine controlling your TV with your smartphone, dynamically streaming content that you have on various devices across your home, as and when you want. Raspberry Pi Media Center will show you how to configure the complete experience using readily available and accessible tools, so that you too will soon be enjoying your media from the comfort of your own sofa. <br /><br />With this practical guide, you’ll discover how you can transform your Raspberry Pi into a powerful media center. Using Raspbmc (based on the XBMC distribution), you'll be shown how you can deploy and configure your own media center, including coverage of all the essentials from controlling your device with a TV remote or smartphone, to the creation and customization of your very own media library (including the conversion of any existing collection). You'll even be able to stream multimedia from your devices or directly from the Internet!</p>
Table of Contents (17 chapters)

Configuring MySQL


Now that we have installed the MySQL service, we need to add a new user. These credentials will be used by XBMC instances to interact with the database.

Firstly, we need to bring up the MySQL command-line interface. In Linux and OS X, this can be done by typing mysql in the terminal/console. On Windows systems, go to Start Menu | Programs | MySQL and select MySQL Command Line Client. You will then need to enter the root password you set up during installation.

We can now create a new user called xbmc and grant them sufficient privileges, as follows:

CREATE USER 'xbmc' IDENTIFIED by 'xbmc';
GRANT ALL PRIVILEGES ON *.* TO 'xbmc'@'localhost' IDENTIFIED BY 'xbmc';
GRANT ALL PRIVILEGES ON *.* TO 'xbmc'@'%' IDENTIFIED BY 'xbmc';
FLUSH PRIVILEGES

Tip

Security Tip

The preceding commands create a user with full access to MySQL. Unfortunately this is necessary, as XBMC creates the database itself and changes the schema names as the database version matures. We can, however, make this more...