Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was told they were like "shortcuts" in windows, but I am not exactly sure if I did it right.

I have a MySQL database on my hard drive 1, under /var/lib/mysql/temp

but I want it to be located on drive 2, which can be accessed by cd /drive2, and I want every update and everything to occur on hard drive 2.

So what I did was:

ln -s /drive2/temp /var/lib/mysql/temp

and it seems to work, but everywhere I read it seems as if the syntax I used should have been the other way around.

Did I do it right?


share|improve this question

closed as off-topic by Chopper3, Stone, Sven, Nathan C, Tim Brigham Aug 2 '13 at 11:21

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is a site dedicated to professionals; novice questions are off-topic. Please see the Help Center for more information on topicality. The best advice we can give you is to hire a professional to help you out." – Chopper3, Stone, Sven, Nathan C, Tim Brigham
If this question can be reworded to fit the rules in the help center, please edit the question.

If you are gonna vote down you might at least say why so that i can improve the question right? – Oliver Hoffman Aug 2 '13 at 10:02
Not my DV, but this is a question that can be answered really easily with a short trip to Google or Wikipedia, and since Server Fault is a site for pro admins and not for beginners asking to learn about absolutely fundamental concepts, this question is off-topic anyway. – Sven Aug 2 '13 at 10:43
See the wikipedia page: – slm Aug 2 '13 at 12:15
And if you mouse over the down arrow, you'll see the text "this question does not show any research effort; it is unclear or not useful". Given what others have written above, I think you can reasonably assume that a downvote without comment is for exactly those reasons. – MadHatter Aug 2 '13 at 13:25
up vote 1 down vote accepted

Actually you built the link /var/lib/mysql/temp pointing to /drive2/temp. If your aiming to transfer dbs to /drive2, you should rather:

  • stop mysql
  • move files to drive2
  • link newfolder to oldfolder | change db position in my.cnf
  • restart mysql
share|improve this answer

Symlink is s special file that contains a reference to another file or directory.

ln's TARGET argument goes first and then comes the LINK_NAME. In your case it should be the reverse.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.