[SOLVED] [OS X] Frodo Beta 1: Issue using MySQL
#1
I am trying, without success, to setup MySQL to access my video library. I have successfully installed and setup MySQL:

Code:
CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';
GRANT ALL ON *.* TO 'xbmc';
CREATE DATABASE xbmc_video DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;
FLUSH PRIVILEGES;

I can access MySQL locally on the MySQL server machine:
Code:
mysql -u root -p

Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 754
Server version: 5.5.28-log Source distribution

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select user,host from mysql.user;
+-------+-----------+
| user | host      |
+------+------------+
| xbmc | %         |
| root | 127.0.0.1 |
| root | ::1       |
|      | WebServer |
| root | WebServer |
|      | localhost |
| root | localhost |
+------+-----------+
7 rows in set (0.00 sec)

mysql> show grants for 'xbmc';
+--------------------------------------------------------------------------------------------------------------+
| Grants for xbmc@%                                                                                            |
+--------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'xbmc'@'%' IDENTIFIED BY PASSWORD '*EC4F5173DE994BFEAB7040A4A32B4ED6DE26F6F0' |
+--------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
| xbmc_video         |
+--------------------+
5 rows in set (0.00 sec)

I can access MySQL remotely from a client machine on the network:
Code:
/usr/local/mysql/bin/mysql -h 10.0.1.250 -P 3306 -u xbmc -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 755
Server version: 5.5.28-log Source distribution

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select user,host from mysql.user;
+------+-----------+
| user | host      |
+------+-----------+
| xbmc | %         |
| root | 127.0.0.1 |
| root | ::1       |
|      | WebServer |
| root | WebServer |
|      | localhost |
| root | localhost |
+------+-----------+
7 rows in set (0.01 sec)

mysql> show grants for 'xbmc';
+--------------------------------------------------------------------------------------------------------------+
| Grants for xbmc@%                                                                                            |
+--------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'xbmc'@'%' IDENTIFIED BY PASSWORD '*EC4F5173DE994BFEAB7040A4A32B4ED6DE26F6F0' |
+--------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
| xbmc_video         |
+--------------------+
5 rows in set (0.00 sec)

After setting up MySQL I exported my video library to a single file, deleted MyVideos72.db, textures13.db and Thumbnails folder. I then modified advancedsettings.xml:
Code:
<advancedsettings>
    <fullscreen>true</fullscreen>

    <splash>false</splash>

    <videodatabase>
        <type>mysql</type>
        <host>10.0.1.250</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>xbmc_video</name>
    </videodatabase>

    <Videolibrary>
        <cleanonupdate>true</cleanonupdate>
    </Videolibrary>

    <video>
        <!-- Number of seconds to ignore at video start after which a resume point is created -->
        <ignoresecondsatstart>15</ignoresecondsatstart>
    </video>
</advancedsettings>


Now when I run XBMC I get the error "service.skin.widgets":
Image

And when I attempt to import the exported video library, nothing happens. What am I missing?

Debug Log
Kodi 17, Transparency Skin
PogoPlug v4 running Arm Linux 4.4.63 as MySQL (mariadb) server.
Mac OS 10.12.5
2015 27" iMac 3.3 GHz Quad, 16GB RAM, 1TB SSD
2015 13" Macbook Pro, 8GB RAM, 256GB SSD
AppleTV 4 TV OS 10
Reply
#2
"CREATE DATABASE xbmc_video DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;"

This is your main mistake. Since before Eden, you do not have to create a database, XBMC will do it for you. This was highlighted in the Debug Log as well:

20:51:35 T:140735251779968 NOTICE: Old database found - updating from version 0 to 72
20:51:35 T:140735251779968 ERROR: SQL: The source database was unexpectedly empty.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
(2012-12-05, 04:52)jmarshall Wrote: "CREATE DATABASE xbmc_video DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;"

This is your main mistake. Since before Eden, you do not have to create a database, XBMC will do it for you. This was highlighted in the debug log as well:

20:51:35 T:140735251779968 NOTICE: Old database found - updating from version 0 to 72
20:51:35 T:140735251779968 ERROR: SQL: The source database was unexpectedly empty.

Cheers,
Jonathan

That was it. All I had to do was "DROP xmbc_video", restart XBMC and I am now able to import. Thanks for your help. I was looking at the link to http://www.stephenandrewdesigns.com/pogo...L7In6WTb8s in http://wiki.xbmc.org/index.php?title=HOW...g_up_MySQL. That pogoplug link needs to be updated.
Kodi 17, Transparency Skin
PogoPlug v4 running Arm Linux 4.4.63 as MySQL (mariadb) server.
Mac OS 10.12.5
2015 27" iMac 3.3 GHz Quad, 16GB RAM, 1TB SSD
2015 13" Macbook Pro, 8GB RAM, 256GB SSD
AppleTV 4 TV OS 10
Reply
#4
Thanks for the heads up. I'll make an updated copy of the pogoplug instructions directly on the wiki.
Reply
#5
(2012-12-05, 06:21)Ned Scott Wrote: Thanks for the heads up. I'll make an updated copy of the pogoplug instructions directly on the wiki.

Ned,

If you like here is an updated instructions for installing and setting up MySQL on the Pogoplug:
  1. Install MySQL:
    sudo pacman -Syu mysql

  2. sudo vi /etc/mysql/my.cnf
    In the [mysqld] section, comment out skip-networking and add skip-name-resolve.

  3. Start MySQL:
    If you are using systemd execute: sudo systemctl start mysqld
    If you are using initscripts execute: sudo /etc/rc.d/mysqld start
    If the MySQL fails to start check /var/lib/mysql folder and the contents of /var/lib/mysql that the ownership is mysql:mysql. If you need to fix the ownership:
    sudo chown mysql:mysql /var/lib/mysql/*

  4. Execute MySQL (no root password):
    mysql -u root

  5. Create the xbmc user with a password = xbmc:
    CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';
    GRANT ALL ON *.* TO 'xbmc';
    quit

  6. Start mysqld at boot time:
    If you are using systemd execute: sudo systemctl enable mysqld
    If you are using initscripts: Add mysql to list of DAEMONS in /etc/rc.conf.
Kodi 17, Transparency Skin
PogoPlug v4 running Arm Linux 4.4.63 as MySQL (mariadb) server.
Mac OS 10.12.5
2015 27" iMac 3.3 GHz Quad, 16GB RAM, 1TB SSD
2015 13" Macbook Pro, 8GB RAM, 256GB SSD
AppleTV 4 TV OS 10
Reply
#6
Awesome, thanks!

HOW-TO:Sync multiple libraries/Setting up MySQL/ALARM (wiki)
Reply
#7
(2012-12-08, 09:04)Ned Scott Wrote: Awesome, thanks!

HOW-TO:Sync multiple libraries/Setting up MySQL/ALARM (wiki)

Glad I could contribute. I made a couple of changes to my instructions. Would you put them on the Wiki. Thanks.
Kodi 17, Transparency Skin
PogoPlug v4 running Arm Linux 4.4.63 as MySQL (mariadb) server.
Mac OS 10.12.5
2015 27" iMac 3.3 GHz Quad, 16GB RAM, 1TB SSD
2015 13" Macbook Pro, 8GB RAM, 256GB SSD
AppleTV 4 TV OS 10
Reply

Logout Mark Read Team Forum Stats Members Help
[SOLVED] [OS X] Frodo Beta 1: Issue using MySQL0