Howto Backup Mysql Database

it’s been a while i haven’t write here ..
well i try to write her about mysql
how to dump ur database that using mysql through ssh or telnet
as ussual it was from personal problem when i had to backup databse that had a lot of database in one server
so i googling and found it how

How to create mySQL dump file (export database to sql file)?

The easiest way to export is use next syntax in command prompt (cmd):

mysqldump -u USER -p PASSWORD DATABASE > filename.sql

syntax above are used to backing up ur database each one of it acoring to database name
you can save it to ur own hardrive and burn it monthly or whatever u want *for backing up

if u planing to change ur server
maybe change Os or change ur hardware
*like i had to face it
don’t forget to backup the latest one before u change ur server
or maybe  server crashes and you got mysql dump file stored on your hard drive.

after u had install ur new server and setting all of u need for new server
then u can upload it again ur backup database
and import it again to ur database

then use next command line:

mysql -u username -p password database_name < filename.sql

sytnax bove to import again through ssh accoring to database name

there u go it’s all ready run and go

*hope it can remind me if i need it again*

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: