1

I have a 1TB Western Digital External HDD and I was wondering if I can turn it into a MySQL Database? The HDD itself is connected to my router via USB (BT Home Hub 3) and I would like to experiment with some database ideas at home. Is there any special steps I can take to do what I seek, or is it a hopeless endeavour?

1 Answer 1

1

It is not a silly question as these days when databases are growing beyond gigs this is becoming a common practice. You can do that by moving all your files in current data directory to the new location and make changes in (datadir) in your my.cnf / my.ini accordingly

  1. Stop MySQL (service mysql stop)

  2. Make a dir in the HDD (mkdir /mysqldata)

  3. Move your data files to HDD (cp -rp /var/lib/mysql/* /mysqldata)

  4. Search datadir in my.cnf (cat /etc/mysql/my.cnf | grep datadir )

  5. Change path accordinly (datadir = /var/lib/mysql To: datadir = /mysqldata )

  6. Start MySQL (service mysql start)

1
  • so going from that, If I install MySQL on my Windows 8 Desktop, I can cut all files/directories into the database and connect to it with any PC in the house via MySQL Workbench? Fantastic thanks :3 Mar 3, 2015 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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