# Mediatomb mysql issues ?

## gentoo_newguy

Hi im trying to get mediatomb working. 

I have been following this guide.

http://en.gentoo-wiki.com/wiki/MediaTomb#Configuration_File

I am logged into my machine as the root user. 

I have never used mysql before so have no idea what the problem is. 

I found this on the web 

http://forums.mysql.com/read.php?11,34014,228088

I changed my host name to testserver on the machine and seem to still be having the same problem. 

I have set everything below to mediatomb pass, user, host and daterbase 

```

<host>host</host>

        <database>database</database>

        <username>username</username>

        <password>password</password>

```

```

TestServer ~ # mediatomb

MediaTomb UPnP Server version 0.12.1 - http://mediatomb.cc/

===============================================================================

Copyright 2005-2010 Gena Batsyan, Sergey Bostandzhyan, Leonhard Wimmer.

MediaTomb is free software, covered by the GNU General Public License version 2

2010-10-13 14:52:29    INFO: Loading configuration from: /root/.mediatomb/config.xml

2010-10-13 14:52:29    INFO: Checking configuration...

2010-10-13 14:52:29    INFO: Setting filesystem import charset to ANSI_X3.4-1968

2010-10-13 14:52:29    INFO: Setting metadata import charset to ANSI_X3.4-1968

2010-10-13 14:52:29    INFO: Setting playlist charset to ANSI_X3.4-1968

2010-10-13 14:52:29 WARNING: You enabled the YouTube feature, which allows you

                             to watch YouTube videos on your UPnP device!

                             Please check http://www.youtube.com/t/terms

                             By using this feature you may be violating YouTube

                             service terms and conditions!

2010-10-13 14:52:29    INFO: Configuration check succeeded.

2010-10-13 14:52:51   ERROR: The connection to the MySQL database has failed: mysql_error (2003): "Can't connect to MySQL server on 'mediatomb' (110)"

TestServer ~ #
```

Does anyone no what the problem could be ?

----------

## BT

You don't need to use MySQL. If you disable MediaTomb's mysql USE flag then SQLite will be used instead, which requires no configuration before hand. You will also need to disable MySQL and enable SQLite in config.xml then restart MediaTomb.

If you still want to use MySQL then I believe you have set the wrong value for <host>. It appears you have set the value to host which is wrong. It needs to be the hostname of the machine where MySQL is installed, which in your case is testserver. Before proceding make sure you follow the MySQL configuration section of the Wiki. Also note the the values for <host>, <database>, <username> and <password> from the Wiki are just place holders for the actual values that you set.

----------

## gentoo_newguy

Thank you 

I have all of these <host>, <database>, <username> and <password> set to media tomb i will try to change the host to testserver and reboot the machine. 

Id really like to get it working this way but if i cant i wil try sqllite. 

Thanks and il get back to you.

----------

## gentoo_newguy

I changed the name of the host to my host and still seem to be having a problem 

```
Unknown MySQL server host 'TestServer' (1)
```

Any ideas guys 

=================================

Copyright 2005-2010 Gena Batsyan, Sergey Bostandzhyan, Leonhard Wimmer.

MediaTomb is free software, covered by the GNU General Public License version 2

2010-10-13 17:33:04    INFO: Loading configuration from: /root/.mediatomb/config.xml

2010-10-13 17:33:04    INFO: Checking configuration...

2010-10-13 17:33:04    INFO: Setting filesystem import charset to ANSI_X3.4-1968

2010-10-13 17:33:04    INFO: Setting metadata import charset to ANSI_X3.4-1968

2010-10-13 17:33:04    INFO: Setting playlist charset to ANSI_X3.4-1968

2010-10-13 17:33:04 WARNING: You enabled the YouTube feature, which allows you

                             to watch YouTube videos on your UPnP device!

                             Please check http://www.youtube.com/t/terms

                             By using this feature you may be violating YouTube

                             service terms and conditions!

2010-10-13 17:33:04    INFO: Configuration check succeeded.

2010-10-13 17:33:04   ERROR: The connection to the MySQL database has failed: mysql_error (2005): "Unknown MySQL server host 'TestServer' (1)"

[/code]

----------

## BT

Is the MySQL daemon running? If MySQL is on the same host that MediaTomb is running on, just use localhost for the hostname. You could also try using the IP address of the host instead.

----------

