Is it possible to create database in custom folder? Like:
mysql> create database test FOLDER='/home/username/db_folder/'
?
In Linux environment it can be painless using simple symbolic links:
my.cnf
[/etc/mysql/my.cnf
] for database files destination./var/lib/mysql/
and yours database name is "abccompany"var/lib/mysql/abccompany
] to new destination (let say "/diskY")ln -s /diskY/abccompany abccompany
No its not possible .. there is no FOLDER
switch for the create database
command : http://dev.mysql.com/doc/refman/5.0/en/create-database.html
MySQL uses the folder specified in the my.cnf
file for the placement of its files - look for the datadir
option in the .cnf
file.
Link to the docs for datadir
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With