intlcas.blogg.se

Simple database for mac
Simple database for mac









You should be prompted with the following line:.Mysql -u -p < Example: /Applications/MAMP/Library/bin/mysql -u root -p my_db < /Users/owner/Downloads/my_site_db_backup.sql Run the following mysql command inside that directory:.cd into /Applications/MAMP/Library/bin/.Database ImportĬAREFUL: This will replace all tables in the database you specify! We are all set now for the database import. You should also create an user with root privileges or you can use root, the important part here is that you have the user username and its password so that you can update the database: Create the databaseĪ browser window will pop up, click the tools drop down menu and then the PHPMYADMIN option:Īnd in the Databases tab, create a new one, preferable with the SAME NAME as the database you exported from your site (although I have successfully used different names). If you change the defaults, just be aware that when dumping the database export we will need to know the port you chose for MySQL. Set up your ports or just leave the default ones: Open the MAMP app, go to preferences and set up the location of your source code under web server: Save it and that’s it!, now you can use that url instead of localhost or 127.0.0.1, yay! 2. Open a new terminal window and type: vim /etc/hostsĪnd add something like this: # My local dev subdomains

simple database for mac

I prefer to type in a url like instead of or when working locally, to make that happen you just need to alias your localhost, is fairly simple, just edit your “host database” (is not really a database, is just a text file) and add a new alias.

  • You are not afraid of the terminal (if you are, thats ok, I am sometimes too).
  • You are doing this on a Mac (Although I feel most of this is pretty much the same on windows … maybe).
  • simple database for mac simple database for mac

  • You have your site source code (probably cloned from github, bitbucket or what have you…).
  • For smaller databases exports you can simply import it using the GUI in PhpMyAdmin. (the file may be compressed gzip, bzip2, zip or uncompressed).
  • You have a large database export (32MB and up).
  • You have MAMP installed on your machine (if you don’t, go ahead and download it from here).
  • simple database for mac

    The one aspect I enjoy the least about working with wordpress, is setting up my dev environment, especially if I have a large database export, and not because is hard to do, but rather, because I always forget the whole process and end up googling it all step by step from different places, so I decided it was time to consolidate the whole process and leave it here for the whole world to see… and me of course. For the last two years, the majority of my dev work has been focused on React, but, since I am the more experienced engineer working with wordpress on my team and the one that doesn’t find it daunting (I’m looking at you php), when the occasion presents it self, I normally volunteer to get this sort of projects done quickly.











    Simple database for mac