Saw a post that says you need to put a ! to run a shell command in the MySQL but found in my mysql client that it was \! <shell-command-here> https://electrictoolbox.com/shell-commands-mysql-command-line-client/ To drop to a shell. use \! bash To return to the the...
mysql
Use FORCE INDEX
Just putting this here as I have a SELECT in MySQL that was taking 1.946 sec to return 20 records from a table with 159884 records when using a ORDER BY DESC on a DATETIME field Creating an index and changing the FROM to FORCE INDEX () dropped it down to 0.00079 sec /...
Quick, Dirty and Insecure Mysql Access via Apache Web Server
I am mucking around with creating a mysql web application When trying out all sorts of queries it's sometimes nice to have them output to HTML for viewing in a web browser This file (named myscript.sh) shown below goes in your cgi-bin or other directory which has a...
MySQL Backup to Email or Disk Script
If you run mysqldump --all-databases you get one monolithic file which can be a pain when trying to restore one database. So it's nice to call mysqldump dbname so you get individual database backup files. To call mysqldump for each database requires that you either...