LinuxQuestions.org
Visit Jeremy's Blog.
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-09-2005, 03:51 AM   #1
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
mysql host.frm


I'm trying to write a step by step tutorial for myself on how to set up mysql, because i still get problems sometime,

I've got everything sorted so far, except for one problem...

i'm using the mysql package from linuxpackages.net, i prefer it over installing from source. Please bare with me over this issue.

i've installed a new database with
mysql_installdb

and when i try to start mysql, i notice i have an error in its log

/var/lib/mysql/xushi.err
Code:
InnoDB: Last MySQL binlog file position 0 79, file name ./xushi-bin.000002
050409  8:43:03  InnoDB: Flushing modified pages from the buffer pool...
050409  8:43:03  InnoDB: Started; log sequence number 0 43710
050409  8:43:03 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
050409  8:43:03 [ERROR] Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
I'm not sure why its searching in ./mysql/, but if i locate host.frm, i can find it in
/var/lib/mysql/mysql/host.frm

Am i missing anything? i've set up /etc/my.cnf but there's nothing that talks about /var/lib/mysql/

Last edited by unSpawn; 07-01-2009 at 08:44 AM. Reason: rm sig
 
Old 04-09-2005, 04:04 AM   #2
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
hmm...

apparently i reinstalled the database from the mysql user, and i think that did the trick.. confusing, i don't know why though..

chown -R mysql.mysql /var/lib/mysql
su - mysql
mysql_install_db
/etc/rc.d/rc.mysqld start
exit

Last edited by unSpawn; 07-01-2009 at 08:41 AM. Reason: rm sig
 
Old 04-09-2005, 04:19 AM   #3
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
I hope this helps anyone. It did me (finally)


download from linuxpackages.net
=============
install
============
Code:
installpkg mysql-4.1.11-i486-2mjg.tgz
create a group called mysql
============
Code:
groupadd mysql
create user mysql (if you don't have him.. to see if you do, type su - mysql. If it says "Unknown id: mysql" then you don't have that user.
============
Code:
useradd -g mysql mysql

give user mysql access
============
Code:
chown -R mysql.mysql /var/lib/mysql
install a database from user mysql
============
Code:
su - mysql
mysql_installdb
exit
create a my.cnf file
============
Code:
cp /etc/my-medium.cnf /etc/my.cnf
keep the socket in /var/run/mysql/, its more secure than /tmp.
don't modify anything else


start mysql
============
Code:
chmod +x /etc/rc.d/rc.mysqld
su - mysql
/etc/rc.d/rc.mysqld start
exit
set a password for mysql root user
============
Code:
/usr/bin/mysqladmin -u root password 'new-password'


From this point onwards, i prefer to use mysqlcc to set mysql up..
download it from
http://dev.mysql.com/downloads/other/mysqlcc.html

unpack it
============
Code:
tar xvfz mysqlcc-0.9.4-linux-glibc23tar.gz
run it
============
Code:
cd mysqlcc-0.9.4-linux-glib23/
./mysqlcc
file > new
name: mylocalmysql
hostname: localhost
user: root
password: **********
socket file: /var/run/mysql/mysql.sock

click on test, it should be successful

Last edited by unSpawn; 07-01-2009 at 08:38 AM. Reason: Remove illegible sig.
 
Old 04-22-2005, 08:05 AM   #4
Chutney
LQ Newbie
 
Registered: Nov 2004
Distribution: Fedora Core 4
Posts: 6

Rep: Reputation: 0
mysql in fedora core 3

I just spent a good hour getting mysql going under fedora core 3, so I thought I'd post this procedure to save ppl trouble.

1. Have mysql already installed from the FC3 installation CDs.
2. as root, type at shell:
sh mysql_install_db
3. as root, type at shell:
chown -R mysql.mysql /var/lib/mysql

That's basically all I had to do to set it up. To run the mysql daemon, as root type at shell:
safe_mysqld
 
Old 05-18-2005, 05:55 PM   #5
mtbiker-s
LQ Newbie
 
Registered: May 2005
Location: California
Distribution: FC3
Posts: 1

Rep: Reputation: 0
mysqlcc on FC3

Thanks for posting this up it really helped me out. I was racking my noggin for a while trying to get this config going.
 
Old 05-19-2005, 05:42 AM   #6
bm1
Member
 
Registered: Nov 2002
Location: NZ
Distribution: freeBSD, slack
Posts: 156

Rep: Reputation: 30
http://www-dse.doc.ic.ac.uk/Local/mysql/manual.html

from the above website
If you don't set up the grant tables, the following error will appear in the log file when you start the server: mysqld: Can't find file: 'host.frm'
 
Old 05-19-2005, 09:54 AM   #7
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Thanks bm1 I already solved the problem a couple of weeks back, but that link is useful for refreshing my memory again about the problem.

Thanks again.


EDIT:
For anyone else who'se wondering, I still maintain the tutorial, but in another thread, along with Apache and PHP.

Search for "Slackware Guide for AMP - Apache Mysql PHP", or have a direct link to my site's one
http://xushi.co.uk/guides/amp.php

Last edited by unSpawn; 07-01-2009 at 08:37 AM. Reason: Remove "نقل فؤادك حيث شئت من الهوى , وما ا
 
  


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
Help mysql innodb recovery from .frm pig.2003 SUSE / openSUSE 0 11-10-2004 04:25 AM
Help mysql innodb recovery from .frm pig.2003 Linux - Software 0 11-10-2004 03:35 AM
can't find host.frm with MySQL wheelie_2000 Linux - Software 3 05-06-2004 06:44 PM
Setting up mysql without user.frm?!?! silversky Slackware 1 02-04-2004 04:01 PM
Invisible mysql .frm file p_nanda2002 Linux - Software 0 07-23-2003 03:16 AM

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

All times are GMT -5. The time now is 06:56 AM.

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