LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 06-28-2007, 06:07 PM   #1
Peter Shepard
Member
 
Registered: Apr 2005
Posts: 96

Rep: Reputation: 15
install of mysql on external harddrive


Hello,

I have just installed 7.04 distro. I have installed mysql 5.0 using Synaptic it now sits in /var/lib/mysql. I have an USB connected external harddrive that I would like to place my data/tables in. Can anyone tell me how to go about this?

A related reply asked me to post df -h and mount so here they are.....

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 53G 2.4G 48G 5% /
varrun 990M 116K 990M 1% /var/run
varlock 990M 0 990M 0% /var/lock
procbususb 990M 132K 990M 1% /proc/bus/usb
udev 990M 132K 990M 1% /dev
devshm 990M 0 990M 0% /dev/shm
lrm 990M 39M 952M 4% /lib/modules/2.6.20-15-generic/volatile
/dev/sdb1 459G 13G 423G 3% /media/disk


mount
/dev/sda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.20-15-generic/volatile type tmpfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/sdb1 on /media/disk type ext3 (rw,noexec,nosuid,nodev)
 
Old 06-28-2007, 07:40 PM   #2
kcorupe
Member
 
Registered: Nov 2004
Location: Arizona
Distribution: Arch
Posts: 107

Rep: Reputation: 15
# Databases located in: /var/lib/mysql/
# Default config file installed by RPM: /etc/my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
 
Old 06-28-2007, 09:15 PM   #3
Peter Shepard
Member
 
Registered: Apr 2005
Posts: 96

Original Poster
Rep: Reputation: 15
Thanks for your response. I change the settings in /var/lib/mysql/my.cnf to below but the database sill gets saved in /var/lib/mysql

Any ideas?

# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /media/disk/mysql
tmpdir = /media/disk/tmp
language = /usr/share/mysql/english
skip-external-locking
 
Old 06-29-2007, 01:46 PM   #4
kcorupe
Member
 
Registered: Nov 2004
Location: Arizona
Distribution: Arch
Posts: 107

Rep: Reputation: 15
Just asking to make sure,

but did you restart the mysql service?
 
Old 06-30-2007, 07:21 PM   #5
Peter Shepard
Member
 
Registered: Apr 2005
Posts: 96

Original Poster
Rep: Reputation: 15
mysql cache

ok got mysql to store on an external hd, thanks for the replies.

Now I have a new problem, I wanted to store these files externally to save space on my hard drive but it seems that the database is being added simultaneously to cache? Anyone have a solution for this?

Thanks
 
  


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
Can't install GNU/Linux after connecting external USB harddrive. NomDeGuerre Linux - Newbie 23 01-15-2008 03:09 AM
mysql database install on external hard drive Peter Shepard Ubuntu 1 06-14-2007 08:29 AM
install DSL onto a external HardDrive then plug into a laptop paul_mat DamnSmallLinux 10 01-28-2007 08:57 PM
how to install external harddrive ION USB 2.0 IOGEAR? cara Slackware 4 03-01-2006 06:33 PM
How DO YOu install a external harddrive??? (slakcware 9.1) chutsu Linux - Hardware 4 11-25-2003 10:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:22 AM.

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