248 bytes added ,  25 December 2018
→‎Copying MySQL databases on the same server: MySQL Date Format: What Datatype Should You Use? We Compare Datetime, Timestamp and INT.
→‎Copying MySQL databases on the same server: MySQL Date Format: What Datatype Should You Use? We Compare Datetime, Timestamp and INT.
 
(One intermediate revision by the same user not shown)
Line 195: Line 195:
#: Create the table using the generated script, or previously existing script that matches the backup structure.
#: Create the table using the generated script, or previously existing script that matches the backup structure.
# Replace .ibd file.
# Replace .ibd file.
#: Remove the newly created .idb file by executing the following: <source lang="mysql">> ALTER TABLE mytablename IMPORT TABLESPACE;</source>
#: Remove the newly created .idb file by executing the following: <source lang="mysql">> ALTER TABLE mytablename DISCARD TABLESPACE;</source>
#: Copy the restored .ibd file into the folder that contains the .ibd file.
#: Copy the restored .ibd file into the folder that contains the .ibd file.
# Reactivate the table
# Reactivate the table
Line 318: Line 318:


That should do it!
That should do it!
= Links =
[https://www.vertabelo.com/blog/technical-articles/what-datatype-should-you-use-to-represent-time-in-mysql-we-compare-datetime-timestamp-and-int MySQL Date Format: What Datatype Should You Use? We Compare Datetime, Timestamp and INT.]


[[Category:System administration]]
[[Category:System administration]]