Search
Recommended Products
Related Links




Meet the Neighbors
Friends of ours. Free stuff, articles, tips, shortcuts, wisdom, moneysavers ....

 

 

Informative Articles

Data Backup For Beginners
It's 10pm. Do you know where your data is? Data. Small bits of information clustered together to make Word files, documents,pictures, MP3s, HTML etc. We work on our computers every single day never sparing a thought for all those millions of...

HTML Encryption from www.htmlblock.co.uk
Protect your website with htmlblock.co.uk. Our software package gives you the highest in encryption and security levels for both the business and home user. Hide your source code by, encrypting HTML, PHP, ASP, XHTML, JSP, SHTML files....

Search Engine Optimization for Newbies
80 percent of web surfers start their journey on a search engine. There are close to four billion pages indexed in the major search engines. While search engines are not (and should not be) the only way to promote your business online, it is one...

The Future of WebSite Ranking
The recent shakeup in Google's search results, which set the SEO (search engine optimization) community buzzing and saw tens of thousands of webmasters watch their site ranking plummet, was in many ways inevitable. Almost all SEO companies and...

What is PTRE and Is It Worth Your Time?
PTRE stands for Paid To Read Email programs. Online companies that pay you to read email that they send to you. You get paid when you click a link in the email and visit the site that they’re advertising, usually for a set amount of time. ...

 
Google
Backing Up And Restoring Your MySQL Database


If you've been using MySQL database to store your important data, it is imperative that you make a backup of your data to prevent any loss of data. This article shows you how to backup and restore data in your MySQL database. This process can also be used if you have to move your data to a new server.

Backing up your database

The quickest and easiest way to backup and restore your database would be to use MySQLDump. If you've got shell or telnet access to your server, you can backup MySQL data by issuing the mysqldump command. The syntax for the command is as follows.

mysqldump -u [uname] -p [pass] [dbname] > [backupfile.sql] [uname] - this is your database username [pass]- this is the password for your database [dbname] - the name of your database [backupfile.sql] - the filename for your database backup

To backup your database 'Customers' with the username 'sadmin' and password 'pass21' to a file custback.sql, you would issue the command

mysqldump -u sadmin -p pass21 Customers > custback.sql

Issuing this command will backup the database to custback.sql. This file can be copied to a safe location or a backup media and stored. For more information on MySQLDump, you can check out :


href="http://www.mysql.com/doc/en/mysqldump.html" target=new>http://www.mysql.com/doc/en/mysqldump.html

Restoring your database

If you have to re-build your database from scratch, you can easily restore the mysqldump file by issuing the following command. This method will not work if the tables already exist in your database.

mysql - u sadmin -p pass21 Customers < custback.sql

If you need to restore existing databases, you'll need to use MySQLImport. The syntax for mysqlimport is

mysqlimport [options] database textfile1

To restore your previously created custback.sql dump back to your Customers Database, you'd issue

mysqlimport -u sadmin -p pass21 Customers custback.sql

For more information on MySQLImport, you can check out : http://www.mysql.com/doc/en/mysqlimport.html

Vinu Thomas is a consultant on Webdesign and Internet Technologies. His website is http://www.vinuthomas.com. You can discuss about this article or any PHP/MYSQL related issues in our Discussion Forums: http://www.vinuthomas.com/forum2.html