Solved

Export and import MySQL with PHPmyAdmin 2.6.2-pl1

Posted on 2007-11-22
9
2,437 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 17

Expert Comment

by:psimation
ID: 20334148
Are you sure the user you are logged into phpmyadmin has write/create permissions?
0
 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

752 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