I have a localhost (XAMPP) on an old pc. I need the MySQL database on my new mac with a localhost (MAMP). Issue is, pc doesn't have internet connection. Any way I can move the database over? Detailed instructions are highly welcomed as I am by no means a server expert. Thanks
You should be able to just use a USB Stick as suggested in the comments above. Just make sure to remove/modify the permissions on the DB file(s) first to avoid having issues with not being able to access the DB once it is moved over. That is a painful, painful, painful lesson if something goes wrong... experience talking.
- Backup MySQL
- Consequently, use the import link on the new PC
XAMP should have phpmyadmin installed. If so, I would use it to create a backup / dump of the data base. Put that on your usb, move it to the mac, and again use phpmyadmin to first create a data base, then import your data.
You could also use mysqldump (at least on Linux from command line. Not sure about XAMP on windows):
mysqldump -u username -p database | gzip > database.sql.gz ( the pipe gzip is optional)
so say your db name is db_important and your db username is phil
mysqldump -u phil -p db_important | gzip > db_important.sql.gz
( when you run this you will be asked for your db password)
Or wihout gzip:
mysqldump -u phil -p db_important > db_important.sql
phpmyadmin should be easiest and safest route for you if your unfamiliar with mysql command line
these links may help: