LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 06-25-2005, 10:23 AM   #1
macmichael01
LQ Newbie
 
Registered: Jun 2005
Location: Heaven
Posts: 6

Rep: Reputation: 0
Can I place mysql dbs in a folder that I define


I have more than one os installed on my computer and I would like to place my mysql dbs on my fat 32 partition so that all os's can have access to the same db. I have a folder on my fat 32 called mysql_dbs and I don't know how to point mysql, under suse, to this folder on my fat 32 fs where the dbs are stored? any suggestions??
 
Old 06-25-2005, 10:50 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
When you start mysql just pas it the --datadir option - ie:
mysqld_safe --datadir=/path/to/mysql/data

You can also use the my.cnf config file.
 
Old 06-25-2005, 12:41 PM   #3
macmichael01
LQ Newbie
 
Registered: Jun 2005
Location: Heaven
Posts: 6

Original Poster
Rep: Reputation: 0
ok so here is what i did

macmichael01@linux:/> mysqld_safe --datadir=file:/windows/D/my_db/data
Starting mysqld-max daemon with databases from file:/windows/D/my_db/data
STOPPING server from pid file file:/windows/D/my_db/data/linux.pid
050625 12:32:34 mysqld ended

am I missing a file? maybe linux.pid???

I dont know what I did but it doesn't seem to work now. Maybe I need to restart! I shall try that. I looked for the file my.cnf in the etc/ folder and could not find a place in that file where I could by the directory path. my DB is on a Fat 32 partition so I hope that won't be a problem.
 
Old 06-26-2005, 01:26 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Make sure mysql has read and write permissions to the data directory and sub directories.
 
Old 06-26-2005, 05:48 PM   #5
macmichael01
LQ Newbie
 
Registered: Jun 2005
Location: Heaven
Posts: 6

Original Poster
Rep: Reputation: 0
Below is what is in the mysql log file if this helps any. As I mentioned earlier, my db is located on a fat 32 FS and I recently changed the settings to give read and write access to the fat 32 FS by setting the unmask=000. The gid=users and the mysql is part of that group what else should I do if it is a read write error? One thing that I did knotice is that I can't goto the directories and right click to change the permissions. I guess the fstab sets the permissions to global for the whole partition. what should i do?


here is the line in my fstab for the fat 32 FS
------------------------------------------------------
/dev/hda4 /windows/D vfat users,gid=users,umask=000,iocharset=utf8 0 0


here is what php has to say when trying to load my page
--------------------------------------------------------
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /windows/D/web_stuff/index.php on line 5

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /windows/D/web_stuff/index.php on line 6

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /windows/D/web_stuff/index.php on line 8
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)


here is the mysql log file
-----------------------------------------------------
050626 17:26:39 mysqld started
050626 17:26:39 Can't start server: Bind on TCP/IP port: Address already in use
050626 17:26:39 Do you already have another mysqld server running on port: 3306 ?
050626 17:26:39 Aborting

050626 17:26:39 /usr/sbin/mysqld-max: Shutdown Complete

050626 17:26:39 mysqld ended

050626 17:31:16 mysqld started
050626 17:31:16 Warning: Can't create test file dir=file:/windows/D/my_db/data/linux.lower-test
/usr/sbin/mysqld-max: Can't change dir to 'dir=file:/windows/D/my_db/data/' (Errcode: 2)
050626 17:31:16 Aborting

050626 17:31:16 /usr/sbin/mysqld-max: Shutdown Complete

050626 17:31:16 mysqld endedf

Last edited by macmichael01; 06-26-2005 at 05:55 PM.
 
Old 06-28-2005, 01:35 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Can you post the output from:
netstat -nlp
 
  


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
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
connecting and reusing existing mysql permissions/dbs/tables after update deesto *BSD 0 10-29-2005 03:46 PM
where a service should place a folder so every user can have read/write access. shahidawan Linux - Security 3 05-07-2005 01:25 PM
Where to put mysql-connector-java folder dukehazord Linux - General 1 09-10-2004 11:30 AM
MySQL - matchings users to dbs? LammaDog Linux - General 1 06-22-2003 04:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 09:49 PM.

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