[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mover directorio de trabajo de mariadb a otro disco duro



On Mon, 14 May 2018 22:06:44 +0200
Galvatorix Torixgalva <galvatorix2017@gmail.com> wrote:

> Hola,
> 
> no me queda claro cual es la ubicacion fisica de ese nuevo disco duro. ¿Vas
> a tener 2 discos duros en el ordenador?.
> 
> Respecto a que la base de datos busque los datos en un directorio en
> concreto, creo que eso lo puedes hacer con el archivo de configuracion de
> mariadb.


Tengo dos disco duros en el pc. Uno el sistema y el otro para alojar las bases de datos.

/var/lib/mysql es donde guarda por defecto

Y llevare todo a /media/Disco160/www/bd/mysql

con respecto al archivo de configuración /etc/mysql/my.cnf

tengo esto:

# The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
# 4. "~/.my.cnf" to set user-specific options.
#
# If the same option is defined multiple times, the last one will apply.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.

#
# This group is read both both by the client and the server
# use it for options that affect everything
#

[client]
port		= 3306
socket		= /var/run/mysqld/mysqld.sock

[mysqld_safe]
socket		= /var/run/mysqld/mysqld.sock


[mysqld]
user		= mysql
socket		= /var/run/mysqld/mysqld.sock
pid-file	= /var/run/mysqld/mysqld.pid
port = 3306
basedir		= /usr
datadir = /media/Disco160/www/bd/mysql

# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/


Pero no surte efecto


Reply to: