Tag: MySQL
-
My “Copy WordPress site to local” script
I wanted to write a script that would copy a WordPress site to the local machine from a remote server (securely over ssh). This would allow me to set up a test environment or backup. First I need to make sure the site exists on the source server. Then I want to get the current…
-
Quick check if a mysql database exists
Here is my bash code that checks if a db exists before I try to create one in a script: This will exit out if there is a database with the name you are searching for. The tricky part for me (and always is) was this double quotes inside the single quotes in the LIKE…
