I am currently using MAMP pro and i want to create a simple terminal script (or a .bat file like on the PC) which allows me to create a sql dump (where i go in and preconfigure the database name) and it automatically creates me the .sql file.
This is what i know so far:
1: The script should first visit cd /applications/MAMP/library/bin
2: When it in that directory, it should run the following
./mysqldump -u root -p databaseName > /Applications/MAMP/htdocs/website/db.sql
Finally, in that directory, when i click the script, it should not replace the older file, but create a new one, maybe just add the date or a integer after it.
Is that possible?
Apologies, i have no idea the best way of doing this.
Thanks in advance.