Solved

Export and import MySQL with PHPmyAdmin 2.6.2-pl1

Posted on 2007-11-22
9
2,420 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
Zoho SalesIQ

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

 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Creating and Managing Databases with phpMyAdmin in cPanel.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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 …

920 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

13 Experts available now in Live!

Get 1:1 Help Now