MySQL
  Home arrow MySQL arrow Page 3 - Transferring Data to MySQL Using SQLyog
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
MYSQL

Transferring Data to MySQL Using SQLyog
By: Insanely Great
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 8
    2003-03-06


    Table of Contents:
  • Transferring Data to MySQL Using SQLyog
  • What is SQLyog?
  • Getting Started
  • Importing only selected rows or importing the resultset of a query
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Transferring Data to MySQL Using SQLyog - Getting Started
    ( Page 3 of 5 )

    First of all you need to create a DSN to MS SQL Server’s PUBS database. Go to Control Panel->Administrative Tools->Data Sources. You will get a dialog as Figure A.

    Figure A

     

    You can create a new DSN by clicking on the Add button and selecting the right options from the wizard.

    Now connect to your MySQL server by giving some simple information to SQLyog (like Hostname, Username, Password, Port etc.). Create a database through SQLyog by selecting DB->Create Database… or using the keyboard shortcut Ctrl+D. Give the database name say My PUBS. After the database has been created, select the Database in the left hand tree window of SQLyog ( i.e. the object browser ) and select Tools->ODBC Import… You will get a window like Figure B.

    Figure B

     

    The wizard also allows you to Import data from another MySQL Data Source but since we are dealing with an ODBC source we choose Import From Other Source… and press Next >. Remember to select the correct database in MySQL in which you want to import data in the combo dropdown. The next dialog Figure C will ask you the source DSN details. Fill up the following details in the dialog –

    System/User DSN – The DSN you just created for MS SQL Server PUBS.

    UserName – Username for the DSN.

    Password – Password for the DSN.

    and press Next.

    Figure C

     

    You will get a screen like Figure D. From this screen you can specify whether to copy all the data from the source, or you can enter a SQL query to select particular records.

    Figure D

     

    If you select Copy table(s) from the data source, you will be presented with Figure E.

    Figure E

     

    Clicking on the transform button (which will be available only if you select a table) loads up the Column Mapping and Transformation Dialog as shown in Figure F.

    Figure F

     

    Through this option you can change the properties of target fields that will be imported in MySQL e.g. you can specify the data type of a field or you can say that it should be a NOT NULL field.

    One powerful feature about the column mapping is that you can specify which column you want to import in MySQL or which column you want to fill with NULL values in the target MySQL database while importing data.

    By default SQLyog will map all the columns from the source table. If you want to ignore a column say phone as shown in Figure F, you can choose <ignore> option for that field in the Destination column of the GRID. An example is shown in Figure G.

    Figure G

     

    Moreover if you want that a field in the Destination table to be filled with NULL value then choose <ignore> option for the corresponding field in the Source column of the Grid. One example is shown in Figure H.

    Figure H

     

    Also you can insert same data for two or more destination field by choosing the same field in the source column of the GRID i.e. you can fill the First Name and the Last Name with First Name (I don’t know why you will do that!!!).



     
     
    >>> More MySQL Articles          >>> More By Insanely Great
     

       

    MYSQL ARTICLES

    - MySQL Security Tips
    - Designing a MySQL Database: Tips and Techniq...
    - The Three Most Important MySQL Queries
    - Null and Empty Strings
    - MySQL Server Tuning Tips and Tricks
    - MySQL Query Optimizations and Schema Design
    - MySQL Benchmarking Tools and Utilities
    - MySQL Benchmarking Concepts and Strategies
    - Take Some Load off MySQL with MemCached
    - MySQL Table Prefix Changer Tool in PHP
    - Using the SIGNAL Statement for Error Handling
    - Error Handling Examples
    - Error Handling
    - Completing a Search Engine with MySQL and PH...
    - Paginating Result Sets for a Search Engine B...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek