Kodi Community Forum
Mysql Database - Need to start again - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Mysql Database - Need to start again (/showthread.php?tid=187710)



Mysql Database - Need to start again - morphjk - 2014-02-28

HI everyone. I managed to stuff up my XBMC database when I was setting it up (due to the way I imported) and now as result it isn't working. So I ended up not using it but it is frustrating me that I don't have everything synced. So I would like to drop the database and re-setup mysql.

The issue I have is that I also have mythtv running in mysql so I need to make sure I don't do anything to that. So I am unsure how I go about it and would appreciate advice.


RE: Mysql Database - Need to start again - nickr - 2014-02-28

if you can use the commandline OK just do similar to this
Code:
mysql -u xbmc -h media -p
drop database MyVideos75
drop database MyMusic32
(ctrl-d to exit)

If you are on gotham, your databases might be a different name (eg the 75 and 32 will be bigger numbers. To see all the databases you can run the mysql command
Code:
show databases

EDIT: sorry should have been clearer on that first line

mysql - that's the commandline mysql client
-u xbmc thats the username you set up to access xbmc
-h media - thats the hostname where the database is located
-p - tell mysql to prompt for a password.


RE: Mysql Database - Need to start again - morphjk - 2014-02-28

(2014-02-28, 07:36)nickr Wrote: if you can use the commandline OK just do similar to this
Code:
mysql -u xbmc -h media -p
drop database MyVideos75
drop database MyMusic32
(ctrl-d to exit)
When I did:

Code:
[media@garage ~]$ mysql -u xbmc -h -p

I got
Code:
ERROR 2005 (HY000): Unknown MySQL server host '-p' (0)

Doing:
Code:
[media@garage ~]$ mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10092
Server version: 5.5.34-MariaDB-log MariaDB Server

Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.

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

Gets me in.

I haven't run the other commands but doing:
Code:
MariaDB [(none)]> show databases

Didn't return any thing at all.

But I am running Frodo.

When I set it up I ran:
Code:
mysql -u root -p
GRANT ALL ON *.* TO 'xbmc'@'localhost' IDENTIFIED BY 'xbmc';
GRANT ALL ON *.* TO 'xbmc'@'%' IDENTIFIED BY 'xbmc';

So at this point I haven't done anything

EDIT:
I just ran:
Code:
SHOW DATABASES;
Which gave me:
Code:
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| mythconverg        |
| performance_schema |
+--------------------+
4 rows in set (0.05 sec)



Re: Mysql Database - Need to start again - nickr - 2014-02-28

So it looks like you don't have any xbmc databases to delete.