-3

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?

Thanks!

4
  • If you are gonna vote down you might at least say why so that i can improve the question right? Aug 2, 2013 at 10:02
  • 3
    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, 2013 at 10:43
  • See the wikipedia page: en.wikipedia.org/wiki/Symbolic_link
    – slm
    Aug 2, 2013 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, 2013 at 13:25

2 Answers 2

1

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
0

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.

Not the answer you're looking for? Browse other questions tagged .