LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 04-10-2006, 09:11 AM   #1
jadukor
Member
 
Registered: Nov 2005
Location: Bangladesh
Distribution: openSUSE
Posts: 83

Rep: Reputation: 15
how to setup mysql for mythtv??


Hi all

I am a newbie running Slackware 10.2 with KDE desktop

I am trying to setup mythtv, so I am also having to setup mysql.

I don't know anything about databases so I am kind of trying to (blindly) follow the instructions in the docs & the file /etc/rc.d/rc.mysqld to get mysql up & running...

My runlevel in /etc/inttab is 4 & this is what I see during startup

*********************
Starting mysqld daemon with databases from /var/lib/mysql
/usr/sbin/nmbd -D
Starting gpm: /usr/sbin/gpm -m /dev/mouse -t imps2
Starting lirc daemon: lircd & lircmd... Done
Starting Guarddog...
STOPPING server from pid file /var/run/mysql/mysql.pid
060410 18:04:02 mysqld ended
Done
Starting LISa daemon...
Done
Starting up X11 session manager...
This is the LAN Information Server LISa 0.2.3
It is free software according the GNU General Public License
Copyright (c) 2000-2003 by Alexander Neundorf
email: neundorf@kde.org
running on port 7741
Have fun ! :-)
*********************

I am still getting the following error while trying to run mythtv

**********************
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2006-04-10 18:18:34.505 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError? Strange...
2006-04-10 18:18:34.556 Database not open while trying to save setting: Language
2006-04-10 18:18:34.574 Unable to connect to database!
2006-04-10 18:18:34.574 Driver error was [1/2002]:
QMYSQL3: Unable to connect
Database error was:
Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)
**********************

So what is it that I am doing wrong??

Thanks
Emon

BTW I also encountered the following errors while running

mysql@magic-box:~$ mysql_install_db

********************
ERROR: 1017 Can't find file: './mysql/help_keyword.frm' (errno: 13)
060410 18:43:31 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/help_keyword.frm' (errno: 13)
060410 18:43:31 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/help_keyword.frm' (errno: 13)
ERROR: 1017 Can't find file: './mysql/help_keyword.frm' (errno: 13)
060410 18:43:31 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/help_relation.frm' (errno: 13)
060410 18:43:31 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/help_relation.frm' (errno: 13)
********************
 
Old 04-11-2006, 06:30 AM   #2
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
These are two separate problems, so, let us deal with one at a time!

Step 1: You need mysql running.

Quote:
STOPPING server from pid file /var/run/mysql/mysql.pid
060410 18:04:02 mysqld ended
This post *might* help you solve that problem:

mysqld error : 'mysql ended'

Step 2: MythTV

Myth won't work until it can connect to a MySQL database, and that won't work until you have run mythtv-setup, then you run mythtv-backend and finally mythtv-frontend. But all of that won't work until you make the databases!

Use the details on this page http://www.mythtv.org/docs/mythtv-HOWTO-6.html#ss6.2 to instantiate your myth databases.

If you have never worked with databases before, I suggest you do some reading. In theory you never have to touch the actual DB, myth should do it for you, but in practice I found the myth setup interface to be particularly clunky so ended up editting the DB directly. For a nice front-end to databases check out SQuirreL (http://squirrel-sql.sourceforge.net/).

I found MythTV needlessly complex for what I wanted, so, I'm now using Freevo (http://freevo.sourceforge.net/) which was much more to my tastes.

Finally, looking at that last error message you might have to clean up your directory structure before you can attempt to re-run mysql_install_db. MySQL tends to break itself if run incorrectly, and you have to fix those things before you can try again.

Someone elses trials and tribulations:

mysql installed?

Read around and see if you can't solve the problem (I highly recommend the search feature here at LQ), otherwise I'm sure we can talk you through it.

- Piete.
 
Old 04-11-2006, 03:43 PM   #3
jadukor
Member
 
Registered: Nov 2005
Location: Bangladesh
Distribution: openSUSE
Posts: 83

Original Poster
Rep: Reputation: 15
Thanks piete

The Links you provided was really helpful...

"chown -R mysql /var/lib/mysql" did the trick!! It was mentioned in the Slackware startup script for mysql (I know...; should have looked more carefully before complaining ...sorry about that)

Looks like mysql starts successfully during bootup

When I do "pstree -p"; this is a small part of what I see

|-lisa(4256)
|-mysqld_safe(3927)---mysqld(3951)
|-nmbd(3955)


So.. does this mean mysql is running ok??? & I can start nagging about mythtv

Thanks again
jadukor

BTW how do setup the root password for mysql???

Last edited by jadukor; 04-11-2006 at 03:49 PM.
 
Old 04-11-2006, 03:51 PM   #4
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Run mysqladmin -u root -p password your_new_password.
There is a way connecting directly to mysql, but I can't remember this way (smth like mysql -p some commands).

Last edited by Alien_Hominid; 04-11-2006 at 03:55 PM.
 
Old 04-11-2006, 06:38 PM   #5
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
You can pipe commands straight into mysql, like ...

Code:
echo "SELECT * FROM mysql" | mysql mysql --user=<user> --host=127.0.0.1 --pasword=<password>
It's been a while since I've actually had to do any manual cli work on MySQL, but I wrote a couple of scripts for cli database applications, feel free to have a squint at them here:

www.kaear.co.uk/linux/music.sh
www.kaear.co.uk/linux/downloads.sh

To answer your question:

Quote:
does this mean mysql is running ok?
http://dev.mysql.com/doc/refman/5.0/...tml?ff=nopfpls

Have a look at this page and run through each step. Some important notes:

1. You've already done steps 1 & 2, don't repeat them!
2. Step 3 can be done by: /etc/rc.d/rc.mysqld start (or stop or restart - they're the commands used in startup/shutdown and to manually restart should you need to)
3. Step 4 will give you a definitive answer. If you don't get that, it's not working.
5. Step 7 is also a nice example of how to use mysql at the command line. It'll provide a practical test on if it's running or not.
6. You can probably skip step 8, but read step 9.

It's important to familiarise yourself with these concepts, since MythTV will want you to run it's own table-makers.

- Piete.

PS: You should've read this manual first time, the link was posted in the thread I gave you =)
 
Old 04-12-2006, 02:51 AM   #6
jadukor
Member
 
Registered: Nov 2005
Location: Bangladesh
Distribution: openSUSE
Posts: 83

Original Poster
Rep: Reputation: 15
Thanks everyone


Quote:
Originally Posted by piete

http://dev.mysql.com/doc/refman/5.0/...tml?ff=nopfpls

Have a look at this page and run through each step. Some important notes:

1. You've already done steps 1 & 2, don't repeat them!
2. Step 3 can be done by: /etc/rc.d/rc.mysqld start (or stop or restart - they're the commands used in startup/shutdown and to manually restart should you need to)
3. Step 4 will give you a definitive answer. If you don't get that, it's not working.
5. Step 7 is also a nice example of how to use mysql at the command line. It'll provide a practical test on if it's running or not.
6. You can probably skip step 8, but read step 9.

It's important to familiarise yourself with these concepts, since MythTV will want you to run it's own table-makers.

I can't seem to get through step 3 & 4.... so I did not proceed any further

This is what I get

**************
mysql@magic-box:~$ mysqld_safe &
[1] 5002
mysql@magic-box:~$ Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/lib/mysql/magic-box.pid
060412 11:46:55 mysqld ended

mysql@magic-box:~$ mysqladmin version
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (111)'
Check that mysqld is running and that the socket: '/var/run/mysql/mysql.sock' exists!
[1]+ Done mysqld_safe

mysql@magic-box:~$ mysqladmin variables
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (111)'
Check that mysqld is running and that the socket: '/var/run/mysql/mysql.sock' exists!
mysql@magic-box:~$
*************

"ls" shows this

*****************
mysql@magic-box:~$ ls -l /var/run/mysql/mysql.sock
srwxrwxrwx 1 mysql mysql 0 2006-04-12 11:45 /var/run/mysql/mysql.sock=
mysql@magic-box:~$
*****************

So what have I done wrong this time???
jadukor
 
Old 04-12-2006, 03:46 AM   #7
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Try to remove mysql.pid and restart mysql.

Last edited by Alien_Hominid; 04-12-2006 at 03:47 AM.
 
Old 04-12-2006, 05:11 AM   #8
jadukor
Member
 
Registered: Nov 2005
Location: Bangladesh
Distribution: openSUSE
Posts: 83

Original Poster
Rep: Reputation: 15
ok...

I uninstalled mysql deleted "/var/lib/mysql" & "/var/run/mysql" then reinstalled mysql and things seem to be working ok now.....

so can I proceed with mythtv now??

jadukor
 
Old 04-12-2006, 05:31 AM   #9
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
I think so
 
Old 04-13-2006, 02:01 AM   #10
jadukor
Member
 
Registered: Nov 2005
Location: Bangladesh
Distribution: openSUSE
Posts: 83

Original Poster
Rep: Reputation: 15
Hi again everyone

After going through the docs & howtos on mysql/mythtv; I have finally been able to (somehow) setup mythtv (phew...). A couple of problems though..... which I did not face while using "tvtime"

1)
I don't get sound

2)
mythtv always runs in fullscreen mode, there seems to be no, window mode!! There ...is... a window mode but that's for the GUI only not for viewing TV.

3)
This is the configuration I used while using tvtime.....

Television Standard: PAL
Channel Frequency Table: france

Although I live in Dhaka,Bangladesh!! "Channel Frequency Table: france" seems to detect the maximum number of channels!!!... I don't have a clue why this is so?? I found it to be so through trial & error.
More over no other application can detect as many channels as "tvtime" can... not even mythtv (or kdetv) even with the above settings.
As for xawtv... I just couldn't understand how to configure it.

Can anyone please shed some light on the above issues

Thanks again everyone
jadukor

BTW

Quote:
Originally Posted by piete

I found MythTV needlessly complex for what I wanted, so, I'm now using Freevo (http://freevo.sourceforge.net/) which was much more to my tastes.
How easy is it to setup freevo ?? I went to their website and it seems like it has tons of dependencies... still it would nice to here from some one who has actually worked with it

Last edited by jadukor; 04-13-2006 at 11:00 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MythTV setup for a MySQL noob sadarax Linux - General 1 03-11-2006 01:31 AM
mythtv setup problems..... heinola Linux - Software 2 01-06-2006 11:58 PM
mythtv mysql database setup help carmat06 Debian 3 09-27-2005 06:41 PM
MythTV install and setup question jpearsonx4 Suse/Novell 3 07-27-2005 02:01 AM
MythTV & mySQL mykrob Linux - Software 14 01-28-2005 02:13 PM


All times are GMT -5. The time now is 04:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration