Curl Error

[stextbox id=”warning”]Error: SSL read: error:00000000:lib(0):func(0):reason(0), errno 104[/stextbox] Getting a curl error from a php script. Try to run curl without php. ssh to the server find the script cd /var/www/vhosts/path/to/script nano script.php Find the call and execute from a command line Output: It looks like the connection is being refused by the remote server. Curl the … Read more

Optimize only fragmented tables in MySQL

When you are using MySQL, you will (likely) have tables that can be fragmented. In MySQL terms this is called “OPTIMIZE”. You could simply OPTIMIZE every table in every database, but during an OPTIMIZE, the tables are locked, so writing is not possible. To minimize the time that MySQL will be locked (and results cannot … Read more

Mysql Report

Another tool of a similar nature is the MySQLReport tool which can be found at http://hackmysql.com. Information can be found here about how to read and analyse the report that is produces from this link http://hackmysql.com/mysqlreportguide. You can load it up remotely and build it on your server in a similar way making use of … Read more

Using Mysqltuner

Download/Installation Simple You can download the entire repository by using ‘git clone’ followed by the cloning URL above. The simplest and shortest method is: Change the permissions you can execute it without calling perl directly. [stextbox id=”warning”]——– Recommendations —————————————————–[/stextbox] General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance MySQL started within last 24 … Read more

Mysql Check/Repair Database

Check a Specific Table in a Database If your application gives an error message saying that a specific table is corrupted, execute the mysqlcheck command to check that one table. The following are some of the key options that you can use along with mysqlcheck. -A, –all-databases Consider all the databases -a, –analyze Analyze tables -1, –all-in-1 Use … Read more

Schedule ClamAV scanning via Cron with zero config, and e-mail notification

Clamav-cron Summary: This is a simple Bash script for those who want to schedule the following tasks via cron: Source: https://code.google.com/p/clamav-cron/ update the ClamAV virus database (freshclam); perform personal system scan (clamscan); send a brief report via e-mail; without any knowledge about ClamAV configuration files (such as clamd.conf or freshclam.conf) and without running the ClamAV … Read more