MySQL Exporting a query to text file via Cron Job
After talking to someone more knowledgeable then me I have came up with the following answers to my original questions.
TLDR; Cron should be fine for what your doing but don't write a bash script, write a PHP script instead, it's better.

Q1. Do I have to worry about putting the database username/password into this &gt;cron script?

A1. As long as the script is in a safe spot on the server that is running the &gt;&gt;cron it should be fine. I can also create a new database user with very &gt;&gt;limited access specifically for this script.

Q2. Is there another more efficient way for me to get this information from &gt;the database without logging into MySQL?

A2. There is a more efficient way to get the information, MySQLi or PDO via a &gt;&gt;PHP script, but there is no way to get around logging in.

Q3. Is Cron jobs appropriate for retrieving information from a database?

A3. Cron jobs should work fine for running the script on a regular basis.

Q4. Is there any MySQL specific cron/scripting issues I need to be aware of &gt;while programing this.

A4. There isn't any cron specific issues but Bash or any other *nix based &gt;&gt;scripting language shouldn't be used because of limited access to MySQL. &gt;&gt;Instead a php script should be created utilizing either (PDO or MySQLi).


If anyone can answer the &quot;Why&quot; PHP is better then Bash Scripting in this scenario feel free to leave a post or comment.