Backup and Restore MySQL Databases



Similar documents
MOODLE Installation on Windows Platform

Lets Get Started In this tutorial, I will be migrating a Drupal CMS using FTP. The steps should be relatively similar for any other website.

Installing Drupal 8 on Windows 7 with XAMPP. I am trying to install Drupal 8 on my Windows machine as a development system.

MySQL Quick Start Guide

Installation Instructions

equate Installation QUICK START GUIDE

SYWorks Vulnerable Web Applications Compilation For Penetration Testing Installation Guide

TIMETABLE ADMINISTRATOR S MANUAL

Contents. 1. Infrastructure

DevInfo 7 Web Installer Guide

Using Internet or Windows Explorer to Upload Your Site

MySQL quick start guide

AJ Matrix V5. Installation Manual

MySQL Quick Start Guide

Livezilla How to Install on Shared Hosting By: Jon Manning

INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP

Project management integrated into Outlook

Omnistar Recruiter Install User Guide (Codelock)

Build it with Drupal 8

SETTING UP AND RUNNING A WEB SITE ON YOUR LENOVO STORAGE DEVICE WORKING WITH WEB SERVER TOOLS

JAMF Software Server Installation Guide for Linux. Version 8.6

Installing buzztouch Self Hosted

How To Backup A Database On A Microsoft Powerpoint 3.5 (Mysqldump) On A Pcode (Mysql) On Your Pcode On A Macbook Or Macbook (Powerpoint) On

Using Microsoft Expression Web to Upload Your Site

JAMF Software Server Installation Guide for Windows. Version 8.6

Changing Your Cameleon Server IP

How to Install Multicraft on a VPS or Dedicated Server (Ubuntu bit)

OrangeHRM Web Installation Guide for Windows

Moving the Web Security Log Database

Upgrading from MSDE to SQL Server 2005 Express Edition with Advanced Services SP2

ProjectPier v Getting Started Guide

How to Copy A SQL Database SQL Server Express (Making a History Company)

How to Setup, Install & Run a Website on your Local Computer. For WordPress - on an Offline Server - WAMP

Industrial Security Facilities Database (ISFD) Troubleshooting Tips

Content Management System

Wireless Guest Server User Provisioning Instructions

Getting Started with MozyPro Online Backup Online Software from Time Warner Cable Business Class

FireBLAST Marketing Solution v2

Application Note - JDSU PathTrak Video Monitoring System Data Backup and Restore Process

IIS, FTP Server and Windows

Migrating MSDE to Microsoft SQL 2008 R2 Express

Web24 Web Hosting Guide

CEFNS Web Hosting a Guide for CS212

Written by: Johan Strand, Reviewed by: Chafic Nassif, Date: Getting an ipath server running on Linux

Bootstrap guide for the File Station

IceWarp Server Windows Installation Guide

How To Restore Your Data On A Backup By Mozy (Windows) On A Pc Or Macbook Or Macintosh (Windows 2) On Your Computer Or Mac) On An Pc Or Ipad (Windows 3) On Pc Or Pc Or Micro

SC-T35/SC-T45/SC-T46/SC-T47 ViewSonic Device Manager User Guide

XCloner Official User Manual

SIMIAN systems. Setting up a Sitellite development environment on Windows. Sitellite Content Management System

Welcome to Collage (Draft v0.1)

Installing CPV Lab Version 2.17

How to Install SMTPSwith Mailer on Centos Server/VPS

VERITAS Backup Exec 9.1 for Windows Servers Quick Installation Guide

OpenPro ERP Software Installation Guide Talbert Ave Suite 200 Fountain Valley, CA USA Phone Fax

Backup/Restore MySQL Server

Configure Single Sign on Between Domino and WPS

Customer Control Panel Manual

Sugar Open Source Installation Guide. Version 4.5.1

Scala InfoChannel Content Manager 5 Backup and Restore Instructions

Guide to the Configuration and Use of SFTP Clients for Uploading Digital Treatment Planning Data to ITC

Using and Contributing Virtual Machines to VM Depot

How to use FTP Commander

Getting started with PrestaShop 1.4

FaxCore Ev5 Database Migration Guide :: Microsoft SQL 2008 Edition

They are superuser accounts with full privileges to do anything with a password of some_pass.

Synthesis Migration Guide

Desktop Deployment Guide ARGUS Enterprise /29/2015 ARGUS Software An Altus Group Company

RaidenFTPD Log Analyser Web Edition

Optional Lab: Data Backup and Recovery in Windows 7

ClicktoFax Service Usage Manual

SETTING UP A LAMP SERVER REMOTELY

Installing an open source version of MateCat

Installing Drupal on Your Local Computer

Install SQL Server 2014 Express Edition

Moving the TRITON Reporting Databases

QUANTIFY INSTALLATION GUIDE

Setting Up a Backup Domain Controller

How to Use Your UT WebSpace Account By Kimberly Pendell October 2004

How to Create a Simple Content Management Solution with Joomla! in a vcloud Environment. A VMware Cloud Evaluation Reference Document

Installing LearningBay Enterprise Part 2

enter the administrator user name and password for that domain.

Labtech Learning Management System. Windows Installation. Standart Version 1.0

9. Database Management Utility

Table of Contents. CHAPTER 1 About This Guide CHAPTER 2 Introduction CHAPTER 3 Database Backup and Restoration... 15

NovaBACKUP xsp Version 15.0 Upgrade Guide

Kollaborate Server Installation Guide!! 1. Kollaborate Server! Installation Guide!

Thirtyseven4 Endpoint Security (EPS) Upgrading Instructions

NSave Table of Contents

Enterprise Data Integration (EDI)

HC8 Installation Guide

Upgrading VMware Identity Manager Connector

Document History Revision Date: October 30, 2006

Lab - Data Backup and Recovery in Windows 7

Server Installation ZENworks Mobile Management 2.7.x August 2013

SQL Server 2008 R2 Express Edition Installation Guide

FaxCore 2007 Database Migration Guide :: Microsoft SQL 2008 Edition

EVault for Data Protection Manager. Course 361 Protecting Linux and UNIX with EVault

Extending Remote Desktop for Large Installations. Distributed Package Installs

If you examine a typical data exchange on the command connection between an FTP client and server, it would probably look something like this:

Transcription:

Backup and Restore MySQL Databases

As you use XAMPP, you might find that you need to backup or restore a MySQL database. There are two easy ways to do this with XAMPP: using the browser-based phpmyadmin tool or using MySQL s command-line tools. This guide describes both options. This guide assumes that you already have a PHP application that uses a MySQL database deployed on XAMPP. The example application used in this guide is WordPress, although the steps outlined below will work for any application. TIP Remember that you can install WordPress quickly using the Bitnami WordPress module for XAMPP. Using phpmyadmin XAMPP includes phpmyadmin, an open-source, browser-based tool for managing MySQL database servers. To backup a MySQL database using phpmyadmin, follow these steps: 1. Browse to http://localhost/phpmyadmin or http://127.0.0.1/phpmyadmin. If required, log in using your database access credentials. On a fresh XAMPP installation without any changes, you can log in as root with a blank password. 2. Select the database to be backed up from the list in the left navigation pane. In this case, we re backing up the WordPress database, which is named bitnami_wordpress. 3. Select the "Export" command in the top navigation bar. 4. On the resulting page, select "Quick" as the export method and "SQL" as the output format. Click "Go" to proceed. 1

phpmyadmin will export the database to a text file as a series of SQL statements. Once done, the browser will prompt you to download it to the desktop. This text file is your backup, so store it safely! At a later point, you may wish to restore the database. To restore the data to a fresh MySQL database using phpmyadmin, follow these steps: 1. Browse to http://localhost/phpmyadmin or http://127.0.0.1/phpmyadmin. If required, log in using your database access credentials. 2. Select the "New" command in the left navigation pane. 3. On the resulting page, enter a name for the new database (in this case, myblog). Select the collation "utf8_general_ci". Click "Create" to create the database. 2

Once the database has been created, it will appear in the left navigation pane. 4. Select the new database from the left navigation pane. In the resulting page, select the "Import" command in the top navigation bar. 5. Click the "Browse _" button and select the backup file created earlier. Click "Go" to proceed. phpmyadmin will import the data from the backup file. Once complete, you will see a screen indicating the status of the import. 3

If you browse the contents of the database, you should now see your original data. You should now update your application s configuration and point it to your newly-created database. For example, with the Bitnami WordPress module, you will need to edit the wp-config.php file in the apps\wordpress\htdocs\ subdirectory of your XAMPP installation directory. Within this file, you will need to update the DB_NAME constant to use the new database name. NOTE By default, PHP (and therefore phpmyadmin) is configured to only accept uploads up to 128 MB in size. If your database is larger than this, you need to modify the PHP configuration file to accept a larger upload size. To do this, edit the php.ini file in the etc\ subdirectory of your XAMPP installation directory and increase the values of the post_max_size and upload_max_filesize variables. Save your changes and restart Apache for the changes to take effect. Using Command-Line Tools MySQL includes two command-line tools that you can use to quickly backup and restore databases. The mysqldump tool is used to export the contents of a database to a text file, while the mysql client can be used to import data from a text file into a MySQL database. To backup a MySQL database from the command line, follow these steps: 1. Ensure that the MySQL server is running. 4

2. Open a new Linux terminal. 3. Use the command below to export the contents of the selected database. In this example, we re backing up the WordPress database, which is named bitnami_wordpress, to a file named bitnami_wordpress.sql. This text file is your backup, so store it safely! /opt/lampp/bin/mysqldump --user=root --password="" bitnami_wordpress > bitnami_wordpress.sql At a later point, you may wish to restore the database. To restore the data to a fresh MySQL database from the command line, follow these steps: 1. Ensure that the MySQL server is running. 2. Open a new Linux terminal. 3. Use the mysql client to create a new, empty database to hold your data. In this example, the new database is named myblog. /opt/lampp/bin/mysql --user=root --password="" -e "CREATE DATABASE myblog" Remember to use the correct database access credentials in the command. On a fresh XAMPP installation without any changes, you can usually log in as root with a blank password. 4. Use the mysql client to import the contents of the backup file into the new database. /opt/lampp/bin/mysql --user=root --password="" --database=myblog < bitnami_wordpress.sql The command-line client will now import the data from the backup file. 5

If you browse the contents of the database, you should now see your original data. You should now update your application s configuration and point it to your newly-created database. For example, with the Bitnami WordPress module, you will need to edit the wp-config.php file in the apps/wordpress/htdocs/ subdirectory of your XAMPP installation directory. Within this file, you will need to update the DB_NAME constant to use the new database name. 6