Archive for 'Web Development'

Backup of all MySQL databases

To backup all MySQL databases on a machine, use the following command: -

mysqldump -u root -psecret –all-databases > backup.sql

To restore all databases, use the following command: -

mysql -u root -psecret < backup.sql

To restore a single database (from a cpanel backup etc), use the following command: -

mysql -u user -psecret dbname < dbbackup.sql

AJAX Libraries API

The “AJAX Libraries API” is a google-sponsored initiative that hosts key javascript libraries: -

It handles the cache headers etc, and more importantly saves your bandwidth!

To use them, simply refer to them in your HTML. For example, to load Prototype version 1.6.0.2, place the following in your HTML:

<script src=”http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js”></script>

Graphs and Charts

Open Flash Chart is a great way to include fancy graphs and charts on your web site. There are plenty of examples and tutorials on the site – it’s really easy to use.

Web Page Backgrounds

Sometimes, you just need a simple background for a web page. BgPatterns is a great free website that allows you to create your own tiled/repeating backgrounds – ideal for web pages or desktops.