FORUM HOME | WHUK BLOG   
WEB HOSTING UK AFFORDABLE WEBSITE HOSTING SERVICES IN UNITED KINGDOM
PHP LINUX SHARED HOSTING WINDOWS ASP.NET HOSTING PACKAGES
ECOMMERCE HOSTING ASP MSSQL MS ACCESS ODBC FRONTPAGE HOSTING
CPANEL WHM FANTASTICO RESELLER DEDICATED SERVER WEB HOSTING
CHEAP PLESK CPANEL HTML MYSQL BEST UK VPS HOSTING COMPANY
CHEAP RELIABLE UK HOSTING PROVIDER SINCE 2001
MANAGED WEB HOSTING SERVICE
AFFORDABLE WEBSITE HOSTING SERVICES IN UNITED KINGDOM

Web Hosting UK Forums | Linux Windows Dedicated Server and cPanel VPS Hosting Forum » Community Forums » General website help

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 18-07-10, 06:59 PM
Senior Member
 
Join Date: May 2010
Posts: 120
Default How do I import a MySql Database?

Hi all, im begging for help again

I am moving one of my sites over from a free host to here as although the uptime is good (for a free host), i want to have a bit more control over the site in general.

I have figured out moving the scripts files via FTP, and thats not my problem, my problem is with the MySql side of things. I have been given some advice by other users on their forum, but they can not really give me any info for this side of the move.

When I export the MySql database are these settings correct?
Quote:
Export All / Selected Tables


(If you're not sure, select both.)

Structure (selected) Data (selected)

Advanced:

Export with extended inserts (selected)
(If not sure, leave this on . It greatly reduces output size).

Add DROP TABLE IF EXISTS (selected)
(If not sure, leave this on).

Export in:

.sql or compressed .gz which should i select for this option?
So - I know WHERE to upload the MySql details from my old host, but thats as far as I have got.

Here's the tips/advice i got from the other forum

Quote:
On the other server you most probably have some tools to manage databases, most commonly used is PHPMyAdmin - simply create empty database in there and import the database content from the file that you exported to from old database in here.
Create an empty database - is this a MySql database?

Quote:
Most likely you will need to re-configure the script you use in some configuration/settings.php file to apply new database login credentials
I assume that this is in the script that i'm moving?

Many thanks for your advice
Russell
Reply With Quote

  #2 (permalink)  
Old 19-07-10, 07:54 AM
Technical Support
 
Join Date: Feb 2010
Posts: 34
Thumbs up

Hi Russell,

Please refer below instructions to Export and Import database from PHPMyAdmin.


Access PHPMyAdmin >> Then click on Export >> [ keep all the setting to default ] Then click GO.

* Default settings include :

- SQL schema selected.
- Comments selected.
- Add IF NOT EXISTS selected.
- Add AUTO_INCREMENT value selected.
- Enclose table and field names with backquotes selected.
- Complete inserts selected
- Extended inserts selected.
- Use hexadecimal for BLOB selected
- Compression None selected.

As Compression is set to none so plain .SQL file will be available to download. And you don't need to create MySQL database on new server as .SQL file contains create database query which will create and fill database on same server.

Now lets import this file on new server.

Go to PHPMyAdmin >> Then click on Import >> Browse the .SQL file from local machine.
Then click on Go.

Done!

If you are facing any difficulty then do upload .SQL file under your account and contact us,
we will restore it for you.
Reply With Quote

  #3 (permalink)  
Old 19-07-10, 11:27 AM
Senior Member
 
Join Date: Jan 2007
Location: Dorset
Posts: 1,117
Wink

as for your question :

.sql or compressed .gz which should i select for this option?

if it is a large database then use .gz otherwise no compression will be fine, but both will work either way.

Yes a mysql database. Go into cpanel and create a new database. Once created goto phpmyadmin and follow above advice.


Reply With Quote

  #4 (permalink)  
Old 19-07-10, 01:49 PM
Dan's Avatar
Dan Dan is offline
Got root?
 
Join Date: Aug 2007
Location: England, UK.
Posts: 1,340
Send a message via ICQ to Dan Send a message via AIM to Dan Send a message via MSN to Dan Send a message via Yahoo to Dan Send a message via Skype™ to Dan
Default

Indeed, uploading .gz files is usually a faster process.
__________________
Webhosting.UK.com || cPanel VPS Hosting || Reseller Hosting

Sales: 0808-262-0855
Support: 0800-612-8725
International: +44 191 303 8191
Reply With Quote

  #5 (permalink)  
Old 20-07-10, 08:05 PM
Senior Member
 
Join Date: May 2010
Posts: 120
Default

Thanks for the info and guide, but im confused now as to wether i should create a MySql database first.

Kieran@whuk
Quote:
And you don't need to create MySQL database on new server as .SQL file contains create database query which will create and fill database on same server.
jon123
Quote:
Yes a mysql database. Go into cpanel and create a new database. Once created goto phpmyadmin and follow above advice.
So do I need to create a MySql database first or not?

Sorry If I seem annoying, I just dont want to screw things up

Russell

ALSO AFTER I FIGURED OUT THE DATABASE MOVE
Once I have figured this problem of mine out, can someone tell me how to edit a 'index.php' page?

eg. visitors who would have bookmarked myolddomaim.com/somefolder/index.php
How do i edit that page so that I can tell visitors that i have moved to newdomain.com?

If it helps the index.php in in the coppermine gallery script.

Thanks again.
Reply With Quote

  #6 (permalink)  
Old 21-07-10, 08:29 AM
Technical Support
 
Join Date: Feb 2010
Posts: 34
Thumbs up

Hi Russell,

With PHPmyadmin default setting, option "Add DROP DATABASE" is not selected so you don't need to create MySQL database on new server as .SQL file contains create database query which will create and fill database on same server. If the database is already created on new server then make sure your .SQL backup is generated with DROP DATABASE option so it will delete old database and fill new one.

The location of index.php page and coppermine gallery script configuration will depends on domain's DOCUMENT ROOT. I would recommend you please copy your script on our server and contact us on live chat so we will configure your application script as per your requirement.

Cheers !
Reply With Quote

  #7 (permalink)  
Old 25-07-10, 12:10 PM
Senior Member
 
Join Date: Jan 2007
Location: Dorset
Posts: 1,117
Default

Quote:
With PHPmyadmin default setting, option "Add DROP DATABASE" is not selected so you don't need to create MySQL database on new server as .SQL file contains create database query which will create and fill database on same server
Really? I cant create a new database from phpmyadmin whether its included in the backup or if i try to create on manually! option is denied.
I have to use cpanel only to create new databases
Reply With Quote

  #8 (permalink)  
Old 27-07-10, 04:14 PM
Senior Member
 
Join Date: May 2010
Posts: 120
Default

Thanks for all the replies and advice. all done now after a bit of trial and error.

Thanks again
Russell
Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT. The time now is 02:23 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Copyright 2001-2010 Web Hosting UK. All rights reserved.
Web Hosting UK Forum





Site Map

Shared Cloud
Shared Cloud From £1

Affiliate Program
Earn up to £300 Per Sale

Dedicated Servers
Dedicated Server Hosting

Cloud Hosting
Cloud Server Hosting

Load Balanced Server
Load Balancing Server

VPS Hosting
Linux VPS Hosting

Windows VPS
Windows 2003 VPS

Zimbra Hosting
Zimbra Email Hosting

cPanel Hosting
Shared Linux Hosting

Windows Hosting
Shared Windows Hosting

Coldfusion Hosting
Windows Coldfusion Hosting

cPanel Reseller Hosting
Shared Windows Hosting

Windows Reseller
Windows Reseller Hosting

Email Web Hosting
Email Hosting

Semi-Dedicated Server
Semi-Dedicated Hosting

Remote Backup Plans
Offsite Backup Service


cpanel hosting
Knowledgebase Articles

Pre-Sales Question
Web Hosting FAQ's

Dedicated Hosting
Dedicated Server FAQ's

Virtual Private Servers
VPS Hosting

PHP MySQL Hosting
cPanel Hosting

Windows Hosting
ASP MSSQL Hosting

Domain Name
Domain registration FAQ's

CMS Hosting
CMS Hosting FAQ's

Payment Gateways
Payment FAQ's


Support Tutorials

cPanel Tutorials
cPanel Flash Tutorials

Wordpress Tutorials
Wordpress Flash Tutorials

Plesk Tutorials
Plesk Flash Tutorials

PhpMyadmin Tutorials
PhpMyadmin Flash Tutorials

Drupal Tutorials
Drupal Flash Tutorials

Mambo Tutorials
Mambo Flash Tutorials

Joomla Tutorials
Joomla Flash Tutorials

More Hosting Tutorials