also @ TechSpot: AMD Radeon HD 7770 & Radeon HD 7750 Review
Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Sign up or Login to participate.

Go Back   TechSpot OpenBoards > Software > The Alternative OS

Collaborate in the cloud with Office, Exchange, SharePoint, and Lync

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

Thread Tools Search this Thread
  #1  
Old 01-19-2005
Newcomer, in training
 
Member since: Jan 2005, 3 posts
Trying to start up MySQL on Linux Machine in Fedora Core 3

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/mysqld.pid
050119 16:00:47 mysqld ended"

I then go to check the contents of this mysql.pid 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
  #2  
Old 03-21-2005
Aquilegi's Avatar
Newcomer, in training
 
Member since: Mar 2005, 1 posts
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 mysqld.pid 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).
  #3  
Old 03-21-2005
Newcomer, in training
 
Member since: Mar 2005, 4 posts
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
  #4  
Old 03-21-2005
Newcomer, in training
 
Member since: Mar 2005, 4 posts
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
  #5  
Old 05-22-2005
Phantasm66's Avatar
TechSpot Evangelist
 
Location: Glasgow, Scotland
Member since: Feb 2002, 6,504 posts
Quote:
Originally Posted by sifonell
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:

localhost.localdomain.err

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.

Last edited by Phantasm66; 05-22-2005 at 07:12 AM..
  #6  
Old 05-01-2006
Newcomer, in training
 
Member since: May 2006, 1 posts
thank you !

this infor realy heplfull !
Closed Thread

Similar Topics
Topic Replies Forum
Fedora Core 5 linux & windows XP dual boot 3 The Alternative OS
Help with linux fedora core 5 21 The Alternative OS
Fedora core 4 2 The Alternative OS
Linux Browsers (Fedora Core 4 and others) 2 The Alternative OS
Fedora Core. 12 The Alternative OS

Thread Tools Search this Thread
Search this Thread:

Advanced Search
All times are GMT -4. The time now is 12:13 PM.