Read on full site | Join TechSpot! (it's free) | Bookmark / Share this



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

qtran101
01-19-2005, 08:05 PM
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

Aquilegi
03-21-2005, 10:50 AM
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). :confused:

Ad
03-21-2005, 10:50 AM
  

sifonell
03-21-2005, 12:39 PM
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

sifonell
03-21-2005, 12:48 PM
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 :)

Phantasm66
05-22-2005, 07:10 AM
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.

choanhemnhe
05-01-2006, 03:04 AM
this infor realy heplfull !

Post a reply, see related topics & more

Tip: Download Advanced SystemCare 3 Free - Clean, Repair, Protect & Optimize your PC.



 Top Technology News

TechSpot Blog: Disable Windows automatic check for solutions after a program crashes

Weekend Open Forum: Google Chrome OS and the future of cloud computing

Tech Tip of the Week: Unearth Region-Specific Windows 7 Themes

Sony: PlayStation 3 to be 3D-capable via firmware update

iSuppli: DDR3 to account for over half of DRAM shipments by Q2 2010

Facebook named third most popular video website behind YouTube and Hulu

Patriot introduces new PS-100 SSD series

Sony working on digital store for music, movies, books

More Tech News

  
 Software Downloads

Norton Virus Definitions 2003-07 November 20, 2009

AVG Anti-Virus Updates November 20, 2009

Norton Virus Definitions 2008-09 November 20, 2009

avast! Virus Definitions November 20, 2009

McAfee SuperDAT Update 5808

Kaspersky Anti-Virus Update November 20, 2009

Google SketchUp 7.1.6087

More Downloads



Copyright © 1998-2009 TechSpot.com. TechSpot is a registered trademark. All Rights Reserved.