postgresql sql

Securing PostgreSQL using Host Based Authentication (HBA)

HBA stands for Host-base Authentication. The pg_hba.conf config file controls the authentication method. By default, local connections to Postgres uses peer¬†authentication. That means that instead of asking you for a password, it checks to see if you are currently logged in as a system user that matches the user name in Postgres. This is where […]

Code Linux MAC UNIX Wordpress

WordPress Backup on CentOS

Now that I’ve moved my website over to CentOS, I’ll be showing you how I do backups. My Setup VirtualBox – CentOS web server running WordPress iMac – connected Drobo Goal Run daily mysql backups Run weekly website backups Only keep the latest two backups Run daily rsync’s to my Drobo from my iMac CentOS — […]

Linux UNIX

MySQL – Backup & Restore A Database

Dump all databases mysqldump -u <USERNAME> -p<PASSWORD> –all-databases > alldatabases.sql Dump Multiple/Specific Databases mysqldump -u <USERNAME> -p<PASSWORD> -databases db_name1 [db_name2 …] > alldatabases.sql Dump (Backup) A Single Database mysqldump -u <USERNAME> -p<PASSWORD> <DATABASE_NAME> > <DATABASE_NAME>.sql Restore A Single Database mysql -u <USERNAME> -p<PASSWORD> <DATABASE_NAME> < <DATABASE_NAME>.sql