giles
giles

Reputation: 843

Relocate MySQL to a dropbox location

By default MySQL is installed to C:\xampp\MySQL.

Is it possible to set it to a new generic location such as C:\Dropbox\MySQL?

I'd like to create a shared location, so I can keep my tables in a single location, while accessing from my different machines (albeit not at the same time of course). I'm looking for some kind of config, outside of C:\xampp\MySQL that points to it. I'm assuming that this is the place where I can relocate to the new location.

Upvotes: 1

Views: 1145

Answers (1)

Tim Harper
Tim Harper

Reputation: 2621

Yes, it is possible to change your mysql data path to any path you like.

http://dev.mysql.com/doc/refman/5.1/en/server-options.html#option_mysqld_datadir

You can simply add the flag each time you start mysqld, or you could add it to the [mysqld] section of your user-wide/machine-wide mysql config file.

Of course, you'll have to initialize the tables first, using the mysql_install_db script ( http://dev.mysql.com/doc/refman/5.5/en/mysql-install-db.html )

Upvotes: 2

Related Questions