Header Banner
Gadget Hacks Logo
Gadget Hacks
Internet
gadgethacks.mark.png
Gadget Hacks Shop Apple Guides Android Guides iPhone Guides Mac Guides Pixel Guides Samsung Guides Tweaks & Hacks Privacy & Security Productivity Hacks Movies & TV Smartphone Gaming Music & Audio Travel Tips Videography Tips Chat Apps
Home
Internet

How to Restore a Backup of a MySQL Database Server

May 26, 2011 03:25 AM

In this article, i will show you how to backup/restore mysql from remote server, steps are very simple. You can just copy & paste to do your jobs. This help is on linux system with command line how to. You can do it by navicat tool or MySQL GUI, but i still like terminal command line.MySQL logo with a dolphin graphic.

You can read the dump file back into the server like this:

mysql db-name < backup-file.sql

To restore database called sales, first create the database sales:

$ mysql -u root -p

You will be asked root password of your mysql on server. Please enter root password mysql to access SQL statement.

Now create database called sales using SQL statement:

mysql> CREATE DATABASE sales;

mysql> quit;

Now restore database by using the following command:

$ mysql -u root -p sales < /path/to/sales-backup-file.sql

You will be prompted for password databases to execute the command.

That's all.

You already know how to use your phone. With our newsletter, we'll show you how to master it. Each week, we explore features, hidden tools, and advanced settings that give you more control over iOS and Android than most users even know exists.

Sign up for Gadget Hacks Weekly and start unlocking your phone's full potential.

Related Articles

Comments

No Comments Exist

Be the first, drop a comment!