Solved

Export and import MySQL with PHPmyAdmin 2.6.2-pl1

Posted on 2007-11-22
9
2,416 Views
Last Modified: 2013-12-13
Hi,

We have MySQL ver. 4.1.12 and uses PHPmyAdmin 2.6.2-pl1and PHP 5.
I need to move the databases from Windows 2000 server to a new server Windows 2003 server with same versions of software mention above.
Im using PHPmySQL to export all databases into one file, copy the file to the new server and using  import, but it fails and displays - Can't find the file.

Obviously I'm doing something wrong, but what?
(Export and import seems logical)
If the solution is to upgrade both servers, Im not keen om doing that. As you probably know Im new at this, and therefor need experts-helping-hand to get this work done :o)
Thank you.

Bjarte
0
Comment
Question by:Bjarte Fjelland
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 17

Expert Comment

by:psimation
ID: 20333548
AFAIK, you don't need to physically copy the exported file to the new destination when trying to import.

Do this:

1. Current location: Use phpmyadmin to export the structure and data in a .zip format - this will prompt a download screen - simply save to Desktop or somewhere.

2. Now, connect to the new location's phpmyadmin, create the new DB, and then go to the import link, then browse to the file you downloaded in step 1 and "upload" - if your mysql and phpmyadmin versions are the same, then this will work flawlessly.
0
 
LVL 1

Author Comment

by:Bjarte Fjelland
ID: 20333783
Yes, the version is equal.
I think Im doing something wrong somewhere.
Getting - No tables found in database.

I have 7 databases + mysql and test.
If I select all databases and use the default settings in export.
Tick the 'Save as file' and use default name.
Click the go button and save the file on my desktop.

On the new server
Im not sure what to call the new database, så I tried the same name that the "old" server had.
Using the SQL icon on the upper left corner, and select import, finding the saved file and pressing go.
Sadly I get the same result - No tables found in database.
Tried to export one database, made a new database with same name as that one I exported, but get the same result.
I understand the message, but not have to solve the issue.
Where do I go wrong? Do you have any other suggestion?
0
 
LVL 20

Expert Comment

by:Muhammad Wasif
ID: 20333798
Open the exported SQL file, remove the comments created by phpMyAdmin and upload/import this. This will work without any problem. First do this with a small database to see if this works for you or not.
0
 
LVL 17

Expert Comment

by:psimation
ID: 20334148
Are you sure the user you are logged into phpmyadmin has write/create permissions?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Author Comment

by:Bjarte Fjelland
ID: 20334285
wasifg : Im getting - File could not be read - When removing the information.

psimation: Im using the root user, the same user that was created under the installation. But do I need the same user and password that the old server uses?
0
 
LVL 20

Accepted Solution

by:
Muhammad Wasif earned 250 total points
ID: 20334350
Which comments you deleted? I am talking about comments like these

-- phpMyAdmin SQL Dump
-- version 2.8.0.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 22, 2007 at 06:45 PM
-- Server version: 4.1.15
-- PHP Version: 4.4.4
--
-- Database: `test`
--

-- --------------------------------------------------------

--
-- Table structure for table `add_users`
--

AND

--
-- Dumping data for table `add_users`
--

AND such lines too

-- --------------------------------------------------------
0
 
LVL 1

Author Comment

by:Bjarte Fjelland
ID: 20334452
Yes :o)
0
 
LVL 17

Assisted Solution

by:nplib
nplib earned 250 total points
ID: 20335633
if you are having trouble with the file upload,

you could open the file in a text editor, copy from below the comments to the end, and the paste it in the sql query portion or PHPmyadmin or any query browser and it will work.
0
 
LVL 1

Author Comment

by:Bjarte Fjelland
ID: 20340278
Yes it worked, but I need to take the "import" via the query in small portions.
It is time consuming, but it works.
I tried one of the largest bases, copyed into the query,but my browser stoped responding and the "import" failed :(
I have to thank you all and need to divide the points.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now