Enable innodb_file_per_table

innodb_file_per_table is by default ON Mysql 5.6.6 and onwards. There is plenty of stuff on Google about pros & cons ofinnodb_file_per_table.

This post details how to enable innodb_file_per_table on an existing database. Because innodb_file_per_table affects new tables only, created after innodb_file_per_table is enabled, we need to recreate old databases to force innodb_file_per_table on old tables and reclaim some disk space.

Backup First

Create a dir to take backups:

cd ~
mkdir backup
cd backup


Read More

How to Upgrade Payara Server

The answer to the question of “how do I upgrade?” is always “it depends”, because everyone’s situation is going to be slightly different. This blog will cover some of the most straightforward ways which should apply in the majority of cases.

Either of the following two methods would work in most circumstances:
Backing up and restoring the existing configuration to a new installation
Maintaining completely separate domain and node directories and pointing the new version to the existing directories (more…)

Read More

How to Back Up MySQL Databases

While automated backups are important, sometimes you just want to take a quick and dirty snapshot before making a change to your data.

Creating A Backup

The mysqldump command is used to create textfile “dumps” of databases managed by MySQL. These dumps are just files with all the SQL commands needed to recreate the database from scratch. The process is quick and easy.

If you want to back up a single database, you merely create the dump and send the output into a file, like so:

mysqldump database_name > database_name.sql

Multiple databases can be backed up at the same time: (more…)

Read More

Apache Block Backup Files

A really simple way to “hack” into someone’s site is by checking for common filenames with backup extensions. For example, check this google search for config filetype:php~

Since backup files don’t always contain the correct extension to be processed properly, the httpd usually sends them as plain text. The lines below should be placed in your httpd.conf to block these requests across all sites on your server. If you don’t have httpd.conf access, these lines can go into a .htaccess file. For .htaccess, make sure to place it in the root web directory so it covers all of your subdirectories. (more…)

Read More