Difference between revisions of "MySQL"

Jump to navigation Jump to search
1,230 bytes added ,  11:08, 10 March 2010
Added "Migrate Databases"
(→‎User Accounts: Added "Change User Password")
(Added "Migrate Databases")
Line 120: Line 120:
Different types of join will yield differing results, depending how different rows match up see http://www.wellho.net/mouth/158_MySQL-LEFT-JOIN-and-RIGHT-JOIN-INNER-JOIN-and-OUTER-JOIN.html
Different types of join will yield differing results, depending how different rows match up see http://www.wellho.net/mouth/158_MySQL-LEFT-JOIN-and-RIGHT-JOIN-INNER-JOIN-and-OUTER-JOIN.html


== Software Packages ==
== Migrate Databases ==
There are a number of GUI tools provided to assist in migrating data from one server to another, and these are well worth a look (eg MySQL Migration Toolkit, MySQL Workbench).  However I have found that on occasion I can't get these to work (normally due to apparent permissioning issues, despite having full rights), and revert to the old fashioned manual way.
 
This procedure works for Windows and Unix systems alike, the <code> mysql </code> and <code> mysqldump </code> commands need to be run from the normal Unix shell or Windows command line prompts, not from with the mysql software.
# Export the database from the source machine (from either Unix shell / Windows command prompt as your sourec machine dictates), eg for database called <code> sourcedb </code>
#* <code> mysqldump -u root -p sourcedb > sourcedb.sql </code>
# Copy the file to your destination database server
# Create an empty database on the destination database server
#* <code> CREATE DATABASE destdb; </code>
# Import the database dump
#* <code> mysql -u root -p destdb < sourcedb.sql </code>
# Give you client server access to the new database
#* <code> GRANT ALL PRIVILEGES on destdb.* to 'destdbuser'@'clientsvr' IDENTIFIED BY 'password'; </code>
 


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

Navigation menu