LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 01-16-2003, 05:44 PM   #1
BoonZie
Member
 
Registered: Oct 2002
Location: Malmoe Sweden
Distribution: Slackware 9.1
Posts: 50

Rep: Reputation: 15
MySQL


HI
I'm trying to get MySQL to run on my server, but when I try to start the daemon (safe_mysqld) it starts with the right path to the databases, but stops immediately again wit the following err-log:

030115 23:27:02 mysqld started
030115 23:27:02 /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
030115 23:27:02 mysqld ended

The file host.frm exists, and I have given it chmod 777. I try to start the daemon as root.

I have read that to start and stop MySQL automatically, you could add mysql.server start, and mysql.server stop to the appropriate rc.* files, but witch files are the right ones?
 
Old 01-17-2003, 08:23 AM   #2
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
Distro of Linux? Red Hat, Slackware, etc?
 
Old 01-17-2003, 09:59 AM   #3
Astro
Member
 
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 665

Rep: Reputation: 30
And did you install from source or did you use the one off the slack cd if it is slackware? (Assuming so since you posted here)
 
Old 01-18-2003, 04:52 AM   #4
fskmh
Member
 
Registered: Jun 2002
Location: South Africa
Distribution: Custom slackware64-current
Posts: 307

Rep: Reputation: 92
Did you remember to do a "mysql_install_db" first?
Once you've done that you're supposed to check that the owner and group are mysql and the permissions should be 750, I think.
 
Old 01-20-2003, 01:25 AM   #5
BoonZie
Member
 
Registered: Oct 2002
Location: Malmoe Sweden
Distribution: Slackware 9.1
Posts: 50

Original Poster
Rep: Reputation: 15
I installed from Slack 8.1 CD.
It seems like the problem was that mysql wasn't the owner of the datafiles from "mysql_install_db". This question seems to be solved.

How about the autostart? Anyone knows anything about that?

Tnx
BoonZie
 
Old 01-20-2003, 02:01 AM   #6
Astro
Member
 
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 665

Rep: Reputation: 30
This is what I put in my /etc/rc.d/rc.local file to start MySQL on boot...

Code:
# starting mysql -- astro
/bin/sh -c 'cd /usr/local/mysql ; ./bin/safe_mysqld --user=mysql &'
Keep in mind I installed mine from source.
 
Old 01-20-2003, 12:23 PM   #7
AlleyTrotter
Member
 
Registered: Jun 2002
Location: Coal Township PA
Distribution: Slackware64-15.0
Posts: 783

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
I use in rc.local

/usr/share/mysql/mysql.server start

AlleyTrotter
 
Old 01-21-2003, 01:32 AM   #8
BoonZie
Member
 
Registered: Oct 2002
Location: Malmoe Sweden
Distribution: Slackware 9.1
Posts: 50

Original Poster
Rep: Reputation: 15
That seems good for starting mysql, but will it stop properly without any "stopscript". Have you had any problems with mysql if it just stops with the system?
 
Old 01-24-2003, 12:04 PM   #9
AlleyTrotter
Member
 
Registered: Jun 2002
Location: Coal Township PA
Distribution: Slackware64-15.0
Posts: 783

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
No problems shutting down mysql with the same script or with a reboot you get a message
mysql server shutting down

the regular slackware rc. whatever handles it no problem

AlleyTrotter
 
Old 01-24-2003, 09:52 PM   #10
hing
LQ Newbie
 
Registered: Jan 2003
Posts: 2

Rep: Reputation: 0
Question

i cant start mysql server in slackware 8.1 as well.
similar problem as yours.
can u supply me some hints on that? thx.
 
Old 01-27-2003, 11:32 AM   #11
AlleyTrotter
Member
 
Registered: Jun 2002
Location: Coal Township PA
Distribution: Slackware64-15.0
Posts: 783

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
This is how I got mysql to run, I got this info from some forum who I would like to credit but can't remember where

as root do the following

cd /usr/bin
su mysql
./mysql_install_db
exit

now set the mysql root password per on screen instructions.
then:

/usr/share/mysql.server start

now any user who is a member of the mysql group can run mysql by entering

mysql

AlleyTrotter

Last edited by AlleyTrotter; 03-18-2003 at 12:29 PM.
 
Old 01-28-2003, 05:41 PM   #12
BoonZie
Member
 
Registered: Oct 2002
Location: Malmoe Sweden
Distribution: Slackware 9.1
Posts: 50

Original Poster
Rep: Reputation: 15
Well, I got my MySql to work finally. Thanks for your help.
Boon
 
Old 02-02-2003, 11:18 AM   #13
qmon2002
LQ Newbie
 
Registered: Feb 2003
Posts: 17

Rep: Reputation: 0
Can't start mysql

I was trying to follow the steps described in post #13, and I'm getting the following errror:

ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)
ERROR: 1 Can't create/write to file './mysql/db.frm' (Errcode: 13)

I'm using slackware 8.1 and mysql from the cd.

Help is much appreciated
 
Old 02-02-2003, 04:33 PM   #14
BoonZie
Member
 
Registered: Oct 2002
Location: Malmoe Sweden
Distribution: Slackware 9.1
Posts: 50

Original Poster
Rep: Reputation: 15
When I got the (errno: 13)-code, it turned out that the owner of the databasefiles for MySQL was root, and not mysql.This caused my problems.
I logged in as root, and run mysql_install_db, then I changed the owner of the db-files with "chown -R mysql /var/lib/mysql/mysql". That worked for me, maybe it will work for you to?
Good Luck
 
Old 03-11-2003, 05:32 AM   #15
MaDluvBxX
LQ Newbie
 
Registered: Mar 2003
Posts: 6

Rep: Reputation: 0
same here

almost same problem here
here it is what I did:
(small note, I was logged as root)
Code:
cd /usr/bin
mysql_install_db
/usr/bin/mysqladmin -u root -p password mypass
Since I'm a to be absolutely sure I-ve also did
Code:
/usr/bin/mysqladmin -u root -h Silver_Fang -p password mypass
and the shell returns:
Code:
/usr/bin/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!
then I tryed to start mysql service with the usual
Code:
safe_mysqld
and in the log appeared
Code:
030311 11:45:08  mysqld started
030311 11:45:08  /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
030311 11:45:08  mysqld ended
anything I forgot?
 
  


Reply



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
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 07:19 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
Problems with MySQL on SuSE: Can't Connect (/var/lib/mysql/mysql.sock) neocookie Linux - Software 8 02-07-2008 11:48 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:28 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
Open Source Consulting | Domain Registration