How To Solve the LOAD DATA INFILE Error from –secure-file-priv

Author: , June 12th, 2019

The Problem Tried to load a Tab-delimited text file into MuSQL 5.6.43 and got the following error: mysql> LOAD DATA INFILE ‘sample.txt’ INTO TABLE test_table; ERROR 1290 (HY000): The MySQL server is running with the –secure-file-priv option so it cannot execute this statement Solution One mysql> SHOW VARIABLES LIKE “secure_file_priv”; Copy the file into the […]

How To Create and Restore an SVN Backup Dump File (.dmp)

Author: , February 1st, 2018

Backup Compressed: svnadmin dump /volumes/data/svn/yourRepo | gzip -9 > /volumes/data/backup/yourRepo.dmp.gz Backup Uncompressed: svnadmin dump /volumes/data/svn/yourRepo > /volumes/data/backup/yourRepo.dmp Restore the Repo Create a new SVN repository: svnadmin create /volumes/data/svn/newRepo Restore the dump file to the new repository: svnadmin load /volumes/data/svn/newRepo < /volumes/data/backup/yourRepo.dmp Just for good measure, here is how to checkout from a local repo: svn […]

How To Allow Cross-Site Javascript Using Apache

Author: , September 24th, 2015

The key is to send a response header like this: Access-Control-Allow-Origin: * In the Apache web server, one enables this via the following directive: Header set Access-Control-Allow-Origin * This requires the use of mod_headers, which is enabled by default in Apache. For example:

How To Auto-Restart Apache If the Load Gets Too High

Author: , September 15th, 2015

The script to check and restart apache…works on CentOS – YMMV!

Add to cron * * * * * /root/restart_apache_if_load_hits_threshold.sh >> /var/log/restart_apache_if_load_hits_threshold.log 2>&1