Due to the way Innodb tables are structured, you cannot perform a hotback up of this database without using third party tools. Therefore you must take your database offline for a small period of time while you take the backup.
Backing up MySQL
MySQL backups are performed using the common mysqldump tool. This is a command line utility that ships with MySQL and you use at as follows:
% mysqldump --user=user --password=pass --opt DBNAME > dumpfile.sql
You may also need to specify the --host= parameter to force the hostname you are connecting to. This depends largely on how you’ve setup your user security. This will produce a text file with a series of INSERT/DROP/CREATE SQL statements that will recreate the database.
(more…)
Posted by Alex |
1 Comment »
Most interactive websites nowadays would require a user to log in into the website’s system in order to provide a customized experience for the user. Once the user has logged in, the website will be able to provide a presentation that is tailored to the user’s preferences.
A basic login system typically contains 3 components:
1. The component that allows a user to register his preferred login id and password
2. The component that allows the system to verify and authenticate the user when he subsequently logs in
3. The component that sends the user’s password to his registered email address if the user forgets his password
Such a system can be easily created using PHP and MySQL.
(more…)
Posted by Alex |
No Comments »
As developers, we should endeavour to make our lives easier wherever possible… no one wants to re-invent the wheel after all.
Functions and Subroutines exist to not only save us time, but to bring power to our ASP.
They are just another way of encapsulating code, but have a lot more functionality than just ’saving some code for later’.
First, let’s look at Functions… Imagine a balloon salesman in the street. We’ve all seen them they require one piece of information when you buy a balloon, the colour.
Let say we asked for a red balloon… The balloon salesman armed with this ‘information’ then does a pretty basic action… he hands you the balloon. The balloon you received is a direct result of the information you gave the balloon seller.
(more…)
Posted by Alex |
No Comments »