SOTL wrote:
On Tuesday 15 March 2005 11:21, Derek Jennings wrote:

On Tuesday 15 March 2005 14:42, SOTL wrote:

Hi All

I have created a partition on one of my computer to store critical system
data files called /System_Data.


I am trying to configure MySQL so that it will use /System_Data as its default file storage.

I looked for /etc/my.cnf; found I did not have one so I generated one.

My /etc/my.cnf files contains exactly 1 line which is:
datadir=/System_Data

When I start MySQL I now receive the following error message:

Found option without preceding group in config file /etc/my.cnf at line
1. Fatail error in default handling.
Program aborted.

Would appreciate help in ascertaining what should be added or how current
should be modified.

Frank

It is failing because having created a /etc/my.cnf file it is expecting to find other parameters defined in there in addition to datadir (pid_file=, basedir=/, bindir=/usr/bin )

You could alternatively edit the datadir path in /etc/rc5.d/S90mysql  which
is the script that starts mysql

Alternatively if you create a symlink from /var/lib/mysql
to /mnt/System_Data/mysql  then you would not need to change any
configuration and your data would go in the folder you desire.

BTW: In Linux /var is the default directory to hold data so why do you need
to define a different one?

derek


Hi All and thanks Derek

I have finally gotten back to the above issue in my attempts to resolve my setup issues.

I have printed the instructions for Using Option Files as kindly pointed out to me by David G Stevenson located at:

http://dev.mysql.com/doc/mysql/en/option-files.html

If I understand Derek correctly my.cnf should look something like

[mysql]
datadir=/System_Data
basedir=/
bindir=/usr/bin
pid_file=

This raises two issues to me.

First what is a 'pid_file=' ?
And where is it located?


Second I do not find pid_file, basedir, or bindir mentioned in the MySQL Reference Manual:: 4.3.2 Using Option Files.

Thus to say the least I am confused.

if someone would mind enlighten me on correct procedure I would appreciate it.

Thank
Frank


You may want to take a look at /etc/rc.d/init.d/mysql to see were a lot of things are by default, and how they are set. If you leave "pid_file=" blank, it gets set in this file. The file gets created when mysql starts, and contains the Program ID (PID) of the MySQL server.

Looking at this file, it looks like this is where you would set your data directory, and you would put my.cfg in the data directory you set in this file.

Mikkel
--

  Do not meddle in the affairs of dragons,
for you are crunchy and taste good with Ketchup!

____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________

Reply via email to