Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hey-
I've begun the ardueous trek of starting up my own website, which will be a community like this with the emphasis based mostly on a forum, but will also include blogging software, webmail, and a 'sermons' directory that my friend and I will post to as moderators of this site.
Anyway, as one could imagine, this new site will be an absolute resource CHUGGER. My webspace will be my brother's server, who will host me only because I am providing my own hard drive.
This hard drive will be mounted in /home/freespeak and will be hdb
Anyway, the question.
How does one make an SQL database be stored on ONLY that hdb, as to not interfere with the rest of his server's daily tasks? What is the command in the MySQL shell? Is it even possible?
Any feedback is greatly appreciated. Thanks in advance!
Last edited by benrose111488; 11-22-2004 at 06:57 PM.
Well, I've never done it, but according to this article , since MySQL stores each database in its own directory, you can set up a symlink pointing to another location. You'll just have to make sure that the symlink has the exact same name as the database.
The MySQL admin (your brother?) would create the necessary databases and give you appropriate permissions. That would create a database directory in the normal MySQL data directory. Now on your new hard drive, you want to create a directory where you really want MySQL to store the data. Once that is done, move the files MySQL created from the MySQL database directory to the new hard drive directory. Finally, replace the MySQL database directory for this database with a link like this:
ln -s /path/to/new/directory databasename
In theory, that should "fool" MySQL into thinking that it is writing to a normal database directory, but in fact is writing to your new hard drive.
As I said, I've never done this, but looking at how MySQL works, I see no reason why this shouldn't do the trick.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.