-2

I'm using WAMP and I want to save a new database into a different HDD because I don't have enough free space in the current one.
How can I do that?

NOTE: I don't need WAMP, it's OK if I can run MYSQL alone, and I don't need the databases from the other HDD, I just need a way to save a new database in a different HDD, any recommendation is welcome :)

Enrique
  • 4,693
  • 5
  • 51
  • 71
  • I don't believe there's a way to do it for just a single database, but you can definitely move all of them over. – ceejayoz Sep 23 '19 at 13:59
  • please @ceejayoz remove the duplicate, is not the same and I have found a very easy solution that could be useful for someone else – Enrique Sep 23 '19 at 14:21
  • Your easy solution was listed in the duplicate. ¯\\_(ツ)_/¯ – ceejayoz Sep 23 '19 at 14:47
  • @ceejayoz I didn't see it, the solutions were for Linux and also I was searching the error and didn't find anything. Anyway you can now mark it as duplicate again – Enrique Sep 23 '19 at 15:26

1 Answers1

1

Maybe there are more elegant solutions but this easy trick works fine for me:

1) Edit: "c:\wamp64\bin\mysql\mysql5.7.14\my.ini" and change the "datadir" option, something like:

;datadir="c:/wamp64/bin/mysql/mysql5.7.14/data"    
datadir="YOUR NEW DATA FOLDER PATH"  

2) Copy the original "data" into your new path (without this I was getting errors like "wampmysqld64: Table 'mysql.plugin' doesn't exist"

3) Start Wamp

Enrique
  • 4,693
  • 5
  • 51
  • 71