VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: mysql question (solved)  (Read 2634 times)

stretchedthin

  • Administrator
  • Vectorian
  • *****
  • Posts: 3780
    • Opensourcebistro.com
mysql question (solved)
« on: May 29, 2010, 12:28:13 am »

I'm trying to build mythtv for Vector and have a build ready to test.  The trouble is that before I can do that I need to create a database with mysql.  I have zip experience with mysql but I did try running the command they gave in the instructions as root...
mysql -u root -p  < /usr/share/mythtv/database/mc.sql

This results in the following error....
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)

I'm stuck here, I was hoping someone with a little more mysql experience could help me out.

« Last Edit: May 30, 2010, 10:37:27 pm by stretchedthin »
Logged
Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee

retired1af

  • Packager
  • Vectorian
  • ****
  • Posts: 1310
Re: mysql question
« Reply #1 on: May 29, 2010, 04:53:11 am »

First is mysql started? Post the contents of /etc/my.cnf
Logged
ASUS K73 Intel i3 Dual Core 2.3GHz

bigpaws

  • Vectorian
  • ****
  • Posts: 1869
Re: mysql question
« Reply #2 on: May 29, 2010, 09:25:44 am »

Did you

mysql_install_db, then do a chown at /var/lib/mysql to mysql.mysql.

Bigpaws
Logged

stretchedthin

  • Administrator
  • Vectorian
  • *****
  • Posts: 3780
    • Opensourcebistro.com
Re: mysql question
« Reply #3 on: May 29, 2010, 10:09:50 am »

Did you

mysql_install_db, then do a chown at /var/lib/mysql to mysql.mysql.

Bigpaws
First is mysql started? Post the contents of /etc/my.cnf

I've done none of those things.  My only experience with Mysql was installing a preconfigured Xampp set-up back in 2002, when I only used Windows...(Lord have mercy on my soul.)

So it's safe to assume I've done nothing but install mysql from gslapt.  Any step by step would be appreciated.
Logged
Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee

stretchedthin

  • Administrator
  • Vectorian
  • *****
  • Posts: 3780
    • Opensourcebistro.com
Re: mysql question
« Reply #4 on: May 30, 2010, 07:00:12 pm »

First is mysql started? Post the contents of /etc/my.cnf

I don't seem to have an /etc/my.cnf.  I have my-huge.conf, my-large.cnf, my-medium.cnf, and my-small.cnf. 
I think these are sample files and mysql still needs some set-up before it is good to go. I'm going to do a little digging on my own and see what google can tell me.  If anyone can give a step by step and save me the trouble that would be appreciated.
« Last Edit: May 30, 2010, 07:08:49 pm by stretchedthin »
Logged
Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee

retired1af

  • Packager
  • Vectorian
  • ****
  • Posts: 1310
Re: mysql question
« Reply #5 on: May 30, 2010, 07:13:36 pm »

First of all, we need to start the sql service....

service mysql start

Once the server is started, you should be able to run:

mysql -u root -p  < /usr/share/mythtv/database/mc.sql

However, there's a lot more to running sql. How deep do you really want to get into it? ;D
Logged
ASUS K73 Intel i3 Dual Core 2.3GHz

stretchedthin

  • Administrator
  • Vectorian
  • *****
  • Posts: 3780
    • Opensourcebistro.com
Re: mysql question
« Reply #6 on: May 30, 2010, 07:33:19 pm »

Only as deep as I need to for now.  Which I was hoping was ankle deep, but is starting to look a little more like mid thigh. :)
I'm trying to follow this tut here from the how to's http://forum.vectorlinux.com/index.php?topic=7158.0

Basically I just want to get far enough to launch the command required for mythtv...
mysql -u root -p  < /usr/share/mythtv/database/mc.sql
and then I should be ready to start mythtv-setup

Logged
Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee

stretchedthin

  • Administrator
  • Vectorian
  • *****
  • Posts: 3780
    • Opensourcebistro.com
Re: mysql question
« Reply #7 on: May 30, 2010, 07:37:01 pm »

Here is what I'm getting...
root:# service mysql start
service mysql is not active.

From the error mentioned earlier ...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)

It looks like there should be some contents in the directory /var/run/mysql/ but when I check mine it is empty.  No 'mysql.sock' or anything else for that matter.
« Last Edit: May 30, 2010, 07:45:19 pm by stretchedthin »
Logged
Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee

stretchedthin

  • Administrator
  • Vectorian
  • *****
  • Posts: 3780
    • Opensourcebistro.com
Re: mysql question
« Reply #8 on: May 30, 2010, 08:05:24 pm »

When I type...

root:# service -a

I get the following....
Services level    2    3    4    5
bluetooth*        -    -    -    -   
cron*             -    on   -    on   
cups*             on   on   on   /sbin/service: line 100: [: /etc/rc.d/rc5.d/S39cups: binary operator expected
-   
firewall          -    -    -    -   
fuse*             -    -    -    -   
gpm*              on   -    -    -   
gslaptd*          -    -    on   -   
inetd*            -    on   -    on   
lm_sensors*       -    -    -    -   
portmap*          -    -    -    -   
samba*            -    -    on   -   
sshd*             -    on   on   on   
wicd*             on   on   on   on   
wifi-radar*       -    -    -    -   

I don't see a mysql service option at this run level.  Don't know what to make of this.

Logged
Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee

retired1af

  • Packager
  • Vectorian
  • ****
  • Posts: 1310
Re: mysql question
« Reply #9 on: May 30, 2010, 08:12:07 pm »

I'm going to have to dig into this a bit, and I'll get back to you sometime tomorrow on it. I'm used to MYSQL in a server environment (CentOS) and the standard stuff that I would use on the server isn't working so hot on the notebook. Lemme dig into the differences and figure out how to get the server started, and I'll post the steps once I have it figured out. :)
Logged
ASUS K73 Intel i3 Dual Core 2.3GHz

stretchedthin

  • Administrator
  • Vectorian
  • *****
  • Posts: 3780
    • Opensourcebistro.com
Re: mysql question
« Reply #10 on: May 30, 2010, 08:16:44 pm »

Awesome, that is greatly appreciated. :)
Logged
Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee

stretchedthin

  • Administrator
  • Vectorian
  • *****
  • Posts: 3780
    • Opensourcebistro.com
Re: mysql question
« Reply #11 on: May 30, 2010, 09:03:13 pm »

I've found a thread that may help...http://forum.vectorlinux.com/index.php?topic=7162.msg48964#msg48964

Before you invest to much time I'll play with this and let you know where I run into roadblocks.
Ken
Logged
Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee

stretchedthin

  • Administrator
  • Vectorian
  • *****
  • Posts: 3780
    • Opensourcebistro.com
Re: mysql question
« Reply #12 on: May 30, 2010, 10:37:11 pm »

retired1af, I found what I needed it's here http://www.basicconfig.com/linuxservers/setup_configure_mysql_slackware
Thanks for being willing to dig into this for me, but I think I'm good now.
Logged
Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee

retired1af

  • Packager
  • Vectorian
  • ****
  • Posts: 1310
Re: mysql question (solved)
« Reply #13 on: May 31, 2010, 06:26:43 am »

Good deal. :)
Logged
ASUS K73 Intel i3 Dual Core 2.3GHz