Board index   FAQ   Search  
Register  Login
Board index php forum :: Database phpMyAdmin

Uploading or copying a current DB

How to use phpmyadmin.... phpmyadmin related arguments. Even phpMyAdmin issues

Moderators: macek, egami, gesf

Postby Redcircle » Wed Oct 13, 2004 1:21 pm

when you export a db it just exports the tables and info. If you want to import into a new db you must create a blank db select the SQL in the right pane and either paste into the query box or select the text you want to import.
User avatar
Redcircle
Moderator
Moderator
 
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Postby GostLy » Thu Oct 14, 2004 11:06 am

im not sure if i understand what you mean, but i think i do...

like i have a table named `users` and when i export it and want to put it into the same database with a different name like `users_old` what i do is open the users.sql file in wordpad, use the find/replace function to replace `users` with `user_old` and then save that file, and import that sql file into the database so it has everything the other did, and now their's `users` and `users_old` in the database...
GostLy
New php-forum User
New php-forum User
 
Posts: 36
Joined: Mon Sep 13, 2004 5:47 am

Postby gesf » Sat Oct 16, 2004 6:57 am

You want to backup a table, right !?
For copying/backuping a table use MySQL's INSERT INTO Statement.
Choose one that fits you:
Code: Select all
// 1:

SELECT * INTO table_backup FROM table

// 2:

SELECT table.*
INTO table
   IN 'table_backup.mdb'
   FROM table

// 3:

SELECT column_names(s)
INTO table_backup
   [IN external_database]
   FROM table

// 4:

SELECT field_1, field_2
INTO table_backup
   FROM table

// 5:

SELECT field_1, field_2
INTO table_backup
   FROM table
   WHERE somefield='whatever

// 6:
// Selecting data from more than one table is also possible.
// Example:

SELECT table1.field, table2.field
INTO table1_backup
   FROM table1
      INNER JOIN table2
      ON table1.somefield=table2.somefield


Cheers
User avatar
gesf
Moderator
Moderator
 
Posts: 1718
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden

Postby patna_in » Mon Nov 07, 2005 11:42 pm

Hi, I can use my online webserver's mysqladmin. Now I want to copy the whole DB(if possible) / some TABLEs(structure & data) to my HDD so that I can use them in my local(HDD) webserver. Is it possible/have any idea , how can I do that ???
patna_in
New php-forum User
New php-forum User
 
Posts: 103
Joined: Sun Feb 06, 2005 10:54 am

Postby patna_in » Mon Nov 07, 2005 11:59 pm

I've done it. Thanks to all
patna_in
New php-forum User
New php-forum User
 
Posts: 103
Joined: Sun Feb 06, 2005 10:54 am


Return to phpMyAdmin

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.