please Please help how to get my tables data file from server?

6 replies
Hi ,
I had a php create tables file which was created all my data tables on server by browsing to it like:
www.myanydomain.com/createtables.php

but I forgot to take a back up of it and I deleted the file from server after installed the tables.
now I need that php file ,and I know I can get that file back by exporting it from access to phpmyadmin but don't know how to do it.

there are some options/section there and I am afraid to make mistakes buy not chosing the right option such as:
*Output:which output to select?
*Formate:which formate to select?
*formate spicific option;which box to select?
*and on the dump tables section,there are 3 radio button ,which one to select?
Structure?
Data?
Structure and Data?

*Object creation option:there are some selected box by default and only one at the top is not selected.
so should it be as it is?

*Data Dump option:there are some check box and radio button...which one should be selected?do I have to leave them as it is?

And finally if I should select the formate as SQL for export which will give me a text file,then how should I convert it to a php file to be able to create the tables again for the new installation?

I don't need any information data which is now inside the tables that have put there after installed .
I need only my tables stuff before installed so I can create and install the new one.

I Would be much appreciated if someone tell me how I can go through step by step process how to do this.(completely newbie on this stuff).

Thank You
#data #file #server #tables
  • Profile picture of the author Earnie Boyd
    If you have access to the server just use mysqldump.

    mysqldump -umyuser -pmypass myDB > myDB.sqldump

    Then to import the data into another DB.

    mysql -umyuser -pmypass myNewDB
    mysql> source myDB.sqldump
    mysql> quit
    Signature
    {{ DiscussionBoard.errors[6093081].message }}
    • Profile picture of the author ferenan
      Originally Posted by Earnie Boyd View Post

      If you have access to the server just use mysqldump.

      mysqldump -umyuser -pmypass myDB > myDB.sqldump

      Then to import the data into another DB.

      mysql -umyuser -pmypass myNewDB
      mysql> source myDB.sqldump
      mysql> quit
      Thanks for your comment.
      but I have no clue how to use this one.
      again thank you
      {{ DiscussionBoard.errors[6108355].message }}
  • Profile picture of the author Anditya
    Hmmm... I think you just Create New DB and Copy all table without data... That's will be easy then using Export & Import...
    {{ DiscussionBoard.errors[6094342].message }}
    • Profile picture of the author ferenan
      Originally Posted by Anditya View Post

      Hmmm... I think you just Create New DB and Copy all table without data... That's will be easy then using Export & Import...
      This another good option to do.thanks alot.
      {{ DiscussionBoard.errors[6108416].message }}
  • Profile picture of the author R-Yeah
    Earnie: i doubt he has or know how to use ssh access

    ferenan:

    - goto you phpmyadmin through your cpanel
    - select the database
    - then in the top your have "Export"
    - output: select save it to a file
    - format: leave the default (should be SQL)
    - formate spicific option - not important leave as is
    - on the dump table radio options select - structure (this means it copy the table structure WITHOUT data inside of it - like you want)
    - Object creation option - the only one in the top that means that if you select it, and lets say after you got your file you import it then if you import it to an EXISTING table it will overwrite it, so i guess in your case you can leave it unchecked.
    - Data dump options - leave as is.

    This will generate .SQL file - NOT PHP.
    but when you set up a new system you can go to phpmyadmin create a new database (its in the main screen after login) and then when it is create click the "Import" tab.
    After that it will simply let you select a file - in your case the .SQL file that was saved in the export.

    and then you got a new database with your tables.

    hope it helps.
    {{ DiscussionBoard.errors[6096768].message }}
    • Profile picture of the author ferenan
      Hi R-yeah,
      Thanks alot for your step by step guide.very informative.I'll do it soon.
      ferenan
      {{ DiscussionBoard.errors[6108411].message }}

Trending Topics