Difference between revisions of "MySQL"

Jump to navigation Jump to search
255 bytes added ,  09:31, 27 October 2011
→‎Migrate Databases: Added "Create Blank Copy"
(→‎CREATE / ALTER Tables: Seperated into sub-sections, and added "Keys / Indexes")
(→‎Migrate Databases: Added "Create Blank Copy")
Line 231: Line 231:
#* <code> GRANT ALL PRIVILEGES on destdb.* to 'destdbuser'@'clientsvr' IDENTIFIED BY 'password'; </code>
#* <code> GRANT ALL PRIVILEGES on destdb.* to 'destdbuser'@'clientsvr' IDENTIFIED BY 'password'; </code>


=== Create Blank Copy ===
To create a blank copy of a database (ie with a schema but no data) follow the procedure above but use the <code>-d</code> option when creating the dump, so
* <code> mysqldump -u root -p -d sourcedb > sourcedb-schema.sql </code>


[[Category:MySQL]]
[[Category:MySQL]]

Navigation menu