Koozali.org: home of the SME Server

mysql DB location

jor70

mysql DB location
« on: April 29, 2004, 03:02:50 PM »
Im running mysql fine. The problem is located in the same HD of sme6 and Im coming short of space
How can I do to locate the mysql DBs (just them) in another HD
thks

ergozd

mysql DB location
« Reply #1 on: April 29, 2004, 05:47:10 PM »
MySQL databases are stored at
# /var/lib/mysql

jor70

mysql DB location
« Reply #2 on: April 29, 2004, 05:55:18 PM »
Quote from: "ergozd"
MySQL databases are stored at
# /var/lib/mysql


Is there a way to locate them in another place ?
thks

Souley

mysql DB location
« Reply #3 on: April 29, 2004, 05:59:43 PM »
I think you should succeed by using the ln -s command
Man ls for more details

Good luck
Souley

ergozd

mysql DB location
« Reply #4 on: April 30, 2004, 08:55:51 AM »
You can store MySQL databases "whereever you like"... The settings are in
#/etc/my.cnf

[mysqld]
datadir=/var/lib/mysql


If you plan to change make sure to modify you templates for my.cnf

OR as Souley suggested you can store them somewhere else and create a link with ln

Best rgds, Ergin

jor70

mysql DB location
« Reply #5 on: April 30, 2004, 04:53:01 PM »
Quote from: "ergozd"
You can store MySQL databases "whereever you like"... The settings are in
#/etc/my.cnf

[mysqld]
datadir=/var/lib/mysql


If you plan to change make sure to modify you templates for my.cnf

OR as Souley suggested you can store them somewhere else and create a link with ln

Best rgds, Ergin


Please correct me if Im wrong
will be /sbin/e-smith/expand-templates /etc/my.cnf ?
thks

ergozd

mysql DB location
« Reply #6 on: April 30, 2004, 05:36:44 PM »
File to modify is
/etc/e-smith/templates/etc/my.cnf/008datadir

In order to re-genarate new my.cnf YES, you run
#/sbin/e-smith/expand-template /etc/my.cnf as you alreay knew.  ;-)