Trying to start up MySQL on Linux Machine in Fedora Core 3

Not open for further replies.


TS Rookie
Hi there:

I have followed the instructions of installing mysql in tar.gz form

I am at the part of running it with

Starting the MySQL Database
# su -
# cd /usr/local/mysql
# bin/mysqld_safe --user=mysql &
Starting mysqld daemon with databases from /usr/local/mysql/data

It looks like the MySQL starts and then automatically end by itself.

The error message is :
"STOPPING server from pid file /var/run/mysqld/
050119 16:00:47 mysqld ended"

I then go to check the contents of this and it does not exist when I cat. Actually the folder /var/run/mysqld/ does not even exist in /var/run/ .

Can you guys lend me some insight as to what went run in my install of mysql, in terms of newbie language for linux.

thanks a lot

PS I did run script as req for the grant files.
# su -
# cp mysql-standard-4.0.20-pc-linux-i686.tar.gz /usr/local
# cd /usr/local
# gunzip mysql-standard-4.0.20-pc-linux-i686.tar.gz
# tar xvf mysql-standard-4.0.20-pc-linux-i686.tar
# ln -s mysql-standard-4.0.20-pc-linux-i686 mysql
# cd mysql

# scripts/mysql_install_db --user=mysql


TS Rookie
Any responses to your post?

Hi...I've been encountering the same problem with MySQL...when I look at the logfile it says that it can't create/write and then says can't find a host.frm file. (Sorry...I meant to write down the exact message, but I was in a hurry this morning and can't remember the path). :confused:


TS Rookie
Why not install the MySQL included in the distribution?

There is one basic fact that makes Fedora a very easy to manage distribution.

That is yum

Yum is a new feature which was launched since fedora 1. and has updatede in release 3.

with yum all you would have to do is something like

# yum install mysql

this is the clients

# yum install mysql-server

Yum will look in its package sources and check for dependencies and get them all and finally install.

Why do i sugget to do it like this? Fedora is a rpm-based system, unlike Slackware, for example, where the "natural" way is to install the rpms already released for that system instead of installing the binaries and compiling from source.

rpm-based install of mysqld provides integratikon with its sysV based structure (the way that the init scripts are kept)

Thus you can say then service mysqld start|stop|reload|status

How everm if you don't want to do it i suggest the following, which is always a good debugging practice:

have two terminals open:

in the first terminal you type

# tail -f /var/log/mysqld (or whatever the error logfile is)
Type then a couple of newlines so you know where you are. The tail -f command "watches" the file continuously

In the second console, AFTER you have done this, start the mysql daemon again.

It will crash. Watch the output in the logfile and if it doesn't help you, post it here

Hope it helps


TS Rookie
your problem resides in the permissions

the host.frm file is located in the folder where mysql keeps the "mysql" database, which is its core permissions database.

check that the user you set mysql to run as exists and that it has the necessary permisions over the file and thedirectory structure it lies under.

let's say that mysql holds its databases in /usr/local/share/mysqldata and that it was set to run as mysql

# grep mysql /etc/passwd

if the user is not there, create the group for it, say mysql with gid 55 (let's say)

# adduser -s /sbin/nologin -m -g mysql mysql
# chown -v -R /usr/local/share/mysqldata
# chgrp -v -R /usr/local/share/mysqldata
# chmod -v -R 644 /usr/local/share/mysqldata

now mysql should have all the permissions it requires

The same issue is with the pid file.

Hope this really helps :)


TS Rookie
sifonell said:
check that the user you set mysql to run as exists and that it has the necessary permisions over the file and thedirectory structure it lies under.
That's what got me last night when I was upgrading the mysql used in the container I have for applications I have written. I was scratching my head for about 1 hour until I realised I had to go into the mysql var directory and recursively change the ownership:

chown -R mysql *

Then the mysql server started up with no problems.

Like sifonell said, check the error log files. Under mysql's var directory, I found this file:


When I did a less on the file, I found this bit:

50319 23:42:21 mysqld started
050319 23:42:21 [ERROR] Fatal error: Can't change to run as user 'mysql' ; Please check that the user exists!

Essentially, I had forgotten when reinstalling Fedore Core to recreate the mysql user and set the permissions on the database files appropriately, once this was done all was well.

The lesson from all this..... READ LOG FILES! They are there for a reason.
Not open for further replies.