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
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
Stop MySQL (service mysql stop)
Make a dir in the HDD (mkdir /mysqldata)
Move your data files to HDD (cp -rp /var/lib/mysql/* /mysqldata)
Search datadir in my.cnf (cat /etc/mysql/my.cnf | grep datadir )
Change path accordinly (datadir = /var/lib/mysql To: datadir = /mysqldata )
Start MySQL (service mysql start)
-
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