Hi all, Is it possible to use putty to copy a mysql table (struc + data). So far i just know how to show the tables with mysql> show tables; Code (markup): i tried mysql> copy table1 tableCopy Code (markup): without success Any suggestions? i can't use phpmyadmin as it gives me an error when i tried to copy the table.
You can do this by the following 2 commands. It might take some time to copy depending on the table size CREATE TABLE tableCopy LIKE table1; INSERT INTO tableCopy SELECT * FROM table1; Code (markup):
Wow, that would be awesome. Gonna try it out. Your query is way shorter than phpmyadmin query for copying and inserting table data.
oh man, that works like charm and damn fast too. tx for sharing. btw: any way to exclude the id auto increment column in INSERT INTO tableCopy SELECT * FROM table1; Code (markup): INSERT INTO tableCopy SELECT *,(NOT table1.id) FROM table1; Code (markup):