New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

B2 Rebuild Mysql-database Mediatomb

Got problems with your B2 or B3? Share and get helped!
Post Reply
nerke
Posts: 23
Joined: 29 Jul 2010, 14:33

B2 Rebuild Mysql-database Mediatomb

Post by nerke »

Hi,

I run my B2 as a mediaserver for PS3 and Squeezebox(es). No problemo at all. But. As i live in sweden i want to use öäå in filenames, and especially movies.

I have added the lines as stated in this post http://forum.excito.net/viewtopic.php?f ... tomb#p7090 and realised that i am not running sqlite. So i figure that i have to rebuild Mediatombs Mysql-database.

But how? I think i can do it as stated here http://mediatomb.cc/pages/documentation#id2855464 but i am not sure. And i think i need a little guidance.... :|
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: B2 Rebuild Mysql-database Mediatomb

Post by Cheeseboy »

Hi Nerke,

I thought you wanted to rebuild your database to make it utf8, but when I look at my tables in the mediatomb database they are already in utf8.
Could you please let us know a bit more about why you need to rebuild it?

If you just want to recreate your database, just stop mediatomb, then log in as root on mysql, drop the database, then recreate it and grant it to the mediatomb user with the password in your /etc/mediatomb/config.xml file, then restart mediatomb:

Code: Select all

xyz@b3:/etc/mediatomb$ sudo /etc/init.d/mediatomb stop
Stopping upnp media server: mediatomb.
xyz@b3:/etc/mediatomb$ mysql -u root
mysql> drop database mediatomb;
Query OK, 4 rows affected (0.14 sec)

mysql> create database mediatomb;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on mediatomb.* to 'mediatomb'@'localhost' identified by 'xxxxxxxxxxxxxx';
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye
xyz@b3:/etc/mediatomb$ sudo /etc/init.d/mediatomb start
Starting upnp media server: mediatomb.
xyz@b3:/etc/mediatomb$ mysql -u root
mysql> use mediatomb;
Database changed
mysql> show tables;
+---------------------+
| Tables_in_mediatomb |
+---------------------+
| mt_autoscan         |
| mt_cds_active_item  |
| mt_cds_object       |
| mt_internal_setting |
+---------------------+
4 rows in set (0.01 sec)

mysql> show create table mt_autoscan;
+-------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table       | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
+-------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| mt_autoscan | CREATE TABLE `mt_autoscan` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `obj_id` int(11) DEFAULT NULL,
  `scan_level` enum('basic','full') NOT NULL,
  `scan_mode` enum('timed','inotify') NOT NULL,
  `recursive` tinyint(4) unsigned NOT NULL,
  `hidden` tinyint(4) unsigned NOT NULL,
  `interval` int(11) unsigned DEFAULT NULL,
  `last_modified` bigint(20) unsigned DEFAULT NULL,
  `persistent` tinyint(4) unsigned NOT NULL DEFAULT '0',
  `location` blob,
  `path_ids` blob,
  `touched` tinyint(4) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mt_autoscan_obj_id` (`obj_id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 |
+-------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> 
So you see, it is already in utf8... But perhaps I misunderstood your intentions?

Best regards,

Cheeseboy

EDIT:
Perhaps I should add a word of caution:
The above will of course remove your database, so you will have to endure a full rescan of your library...
nerke
Posts: 23
Joined: 29 Jul 2010, 14:33

Re: B2 Rebuild Mysql-database Mediatomb

Post by nerke »

Hurray! I got åäö! And its showing up on my PS3!

You are the man! :D Thanks a lot!

I noticed that you have a B3 where as i have B2. mayby there is no utf-8 as standard in the B2?
Post Reply