Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying or backingup a mysql table 1

Status
Not open for further replies.

kupe

Technical User
Sep 23, 2002
376
tblVital is part of the db "test" in MySQL, on "C:" via the usual mysql\bin mysql route.

How would I say COPY tblVital - or even BACK-UP tblVital, whichever is the most efficient way, please, Gurus?
 
To make a copy of the table in mysql do
"create table newtable as select * from oldtable;"

To back it up try "mysqldump" from the command line.
 
eric

Thank you very much. If it works (MySql has made a doubting Thomas of me) it will be my most frequently used code. The trouble forgetting a WHERE clause can land you into! Very grateful
paul
 
A good reason to use InnoDB with transactions. Coming from an Oracle background I was very disappointed without having rollback. My normal routine was to do my updates/deletes, look at the result set and if I didn't like it, rollback.
 
My intoduction in this world is with sheltered access where undoing mistakes or oversights is not so challenging.

MySql has been a shock there. All my errors so far have been on practice dbs - the major client is with access, fortunately.

Now I am very keen to get to grips with mysql and php for my major work, which is in websites. Both look great, but there are pifalls for new players. This is where your advice will be so useful, thank you. Here's to a pleasant Yuletide to you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top