Jump to content
The Uniform Server Community
Sign in to follow this  
johntmcii

How can I move the physical location of the mySQL db?

Recommended Posts

I've got the mySQL db physically located here:

 

\usr\local\mysql\data\(mydb)

 

I would like to have US on C:\US, for example, and have my db on my USB drive. How do I get mySQL to look for the physical db file somewhere else?

Share this post


Link to post
Share on other sites

I don’t think that’s possible. A USB drive letter can change depending in what order you connect USB devices.

 

If you want to use existing databases on your PC and have a separate database on your USB stick.

 

You could try the following compromise:

 

Copy Uniform server to your USB Stick.

Run the servers.

Run move servers once (this changes the ports)

Install your database

 

The application that accesses this database requires its MySQL port changing from 3306 to 3307.

 

Don’t know if that helps with what you are trying to do.

 

All the best

Ric ;)

Share this post


Link to post
Share on other sites

Thanks for the replay, Ric.

 

I'm hoping I can work up a script to use a variable USB drive letter, although I'm not sure if that's possible, either, as you mentioned.

 

I'm a lightweight on mySQL and I've not tried to change the physical location of a mySQL file before (normally, I just dump it and import it to different server). After a bit of Google-ing it was not clear to me how I should accomplish a physical location move with US.

 

My end goal is to encrypt my db using mySQL encryption, store just the db on the USB stick, then have US in a folder on the desktop of different PCs.

 

I'll experiment with the migration tool as you suggested.

 

Thanks, again.

John

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...