Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2446
  • Last Modified:

Export and import MySQL with PHPmyAdmin 2.6.2-pl1

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
Bjarte Fjelland
Asked:
Bjarte Fjelland
  • 4
  • 2
  • 2
  • +1
2 Solutions
 
psimationCommented:
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
 
Bjarte FjellandAuthor Commented:
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
 
Muhammad WasifCommented:
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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
psimationCommented:
Are you sure the user you are logged into phpmyadmin has write/create permissions?
0
 
Bjarte FjellandAuthor Commented:
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
 
Muhammad WasifCommented:
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
 
Bjarte FjellandAuthor Commented:
Yes :o)
0
 
nplibCommented:
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
 
Bjarte FjellandAuthor Commented:
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now