<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3943814256987060213</id><updated>2012-02-16T11:38:26.365-08:00</updated><title type='text'>convert-mssql-to-mysql</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://convert-mssql-to-mysql.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3943814256987060213/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://convert-mssql-to-mysql.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>AshTiger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3943814256987060213.post-7131295310979156039</id><published>2009-06-22T06:21:00.000-07:00</published><updated>2009-06-22T06:29:19.125-07:00</updated><title type='text'>Convert data from MS SQL Server to MySQL</title><content type='html'>&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;Today I was given a task to develop a program in VB to transfer data from our  local MSSQL Database to MySQL Database running on remote web hosting. &lt;/span&gt; &lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;As I was quite comfortable with MS SQL Server  and new to MySQL that to, on remote web server, I went straight to work. &lt;/span&gt; &lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;The first thing I did is dow&lt;/span&gt;&lt;span style="font-family:Times New Roman;"&gt;nloaded the MySQL ODBC Driver 3.51. Which I got  quite easily through Google search and MySQL website. The link is &lt;a href="http://dev.mysql.com/odbc/win32"&gt;http://dev.mysql.com/&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;a href="http://dev.mysql.com/odbc/win32"&gt;odbc/win32&lt;/a&gt;  &lt;/span&gt; &lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;Then, next thing I did is developed a form with list box control and combo  box control. I wanted to populate combo box control with the list of databases  and when I select a database in combo box the list box should show the list of  tables in that database.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;To connect to the MySQL Database and get the list of databases and ta&lt;/span&gt;&lt;span style="font-family:Times New Roman;"&gt;bles I  used a ADO DB object and specified the connection string as &lt;/span&gt; &lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span class="csKeyword"&gt;Driver&lt;/span&gt;=&lt;span class="csValue"&gt;{MySQL  ODBC 3.51 Driver}&lt;/span&gt;;&lt;span class="csKeyword"&gt;Server&lt;/span&gt;=localhost;&lt;span class="csKeyword"&gt;Port&lt;/span&gt;=&lt;span class="csValue"&gt;3306&lt;/span&gt;;&lt;span class="csKeyword"&gt;Database&lt;/span&gt;=&lt;span class="csValue"&gt;myDataBase&lt;/span&gt;;&lt;span class="csKeyword"&gt;User&lt;/span&gt;=&lt;span class="csValue"&gt;myUsername&lt;/span&gt;;&lt;span class="csKeyword"&gt;  Password&lt;/span&gt;=&lt;span class="csValue"&gt;myPassword&lt;/span&gt;;&lt;span class="csKeyword"&gt;Option&lt;/span&gt;=&lt;span class="csValue"&gt;3&lt;/span&gt;;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;As for testing I tried to connect to local MySQL Da&lt;/span&gt;&lt;span style="font-family:Times New Roman;"&gt;tabase first. When I run  the form and click the connect button to connect to mySQL I got the following  error&lt;/span&gt;&lt;/p&gt; &lt;p&gt;                    &lt;b&gt;Can't connect to MySQL server on ‘lo&lt;/b&gt;&lt;b&gt;calhost' (10061)&lt;/b&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;After digging into the internet and searching a lot I got the solution. The  reason why I was getting the error was because the Firewall installed in the  machine is preventing my program to access localhost through port 3306. So I  added my program name in allowed list in firewall and then tried again. Wow, I  was successfully connected to MySQL and I was able to populate combo box with  the list of database by issuing the command "SHOW DATABASES". &lt;/span&gt; &lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;After I tested connecting to local MySQL Database server  successfully, I tried to connect  to the MySQL running on remote host, so I change the connection string as follows &lt;/span&gt; &lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;span class="csKeyword"&gt;Driver&lt;/span&gt;=&lt;span class="csValue"&gt;{MySQL  ODBC 3.51 Driver}&lt;/span&gt;;&lt;span class="csKeyword"&gt;Server&lt;/span&gt;=mydomain.com;&lt;span class="csKeyword"&gt;Port&lt;/span&gt;=&lt;span class="csValue"&gt;3306&lt;/span&gt;;&lt;span class="csKeyword"&gt;Database&lt;/span&gt;=&lt;span class="csValue"&gt;myDataBase&lt;/span&gt;;&lt;span class="csKeyword"&gt;User&lt;/span&gt;=&lt;span class="csValue"&gt;myUsername&lt;/span&gt;;&lt;span class="csKeyword"&gt;  Password&lt;/span&gt;=&lt;span class="csValue"&gt;myPassword&lt;/span&gt;;&lt;span class="csKeyword"&gt;Option&lt;/span&gt;=&lt;span class="csValue"&gt;3&lt;/span&gt;;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;And click connect button again, oops I got the  following error&lt;/span&gt;&lt;/p&gt;&lt;p style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U36YCLB__Po/Sj-FtSSIEBI/AAAAAAAAAAc/FJ3Tgn5HpkA/s1600-h/DataLo1.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 54px;" src="http://3.bp.blogspot.com/_U36YCLB__Po/Sj-FtSSIEBI/AAAAAAAAAAc/FJ3Tgn5HpkA/s320/DataLo1.jpg" alt="" id="BLOGGER_PHOTO_ID_5350141895387910162" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;And then again I googled into the internet  nearly spend a couple of hours before I finally got the solution. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;The solution is you have to add your IP address  in the access list of MySQL database hosted in your share web host account. For  doing this, you have to login to CPanel in your share web account and click on  MySQL Databases link. At the botton of the page you will find Access Hosts  section as shown below&lt;/span&gt;&lt;/p&gt;&lt;p style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U36YCLB__Po/Sj-GA4inrdI/AAAAAAAAAAk/HmF7h3LEVnY/s1600-h/DataLo2.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 94px;" src="http://4.bp.blogspot.com/_U36YCLB__Po/Sj-GA4inrdI/AAAAAAAAAAk/HmF7h3LEVnY/s320/DataLo2.jpg" alt="" id="BLOGGER_PHOTO_ID_5350142232075152850" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;in this add the IP address of your machine and  click OK.  If you don't know your IP address you can visit the &lt;a href="file:///C:/DL3Web/whatismyip.com"&gt;WhaitismyIP.com&lt;/a&gt; &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;After entering my IP address in Access list, I  again hit the "Test" button and wow! now I was able to connect successfully to  the MySQL databases at our Shared Web Hosting account. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;So at last I was able to connect successfully to  MySQL database hosted on Shared Webhosting and then went on writing the program  which was not so difficult. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;But it was becoming tedious with data getting  changed weekly and I have to modify programs. Then I searched on internet for  any data migration tools, there were plenty of tools available on the internet.  After testing several tools I zeroed on &lt;a href="http://www.dbload.com"&gt;Data  Loader&lt;/a&gt; &lt;a href="http://www.dbload.com"&gt;&lt;/a&gt;which has a nice interface and have it's own scheduler and it's  ability to map source table columns to target table columns got my favor and  finally convinced by manager to purchase it.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Times New Roman;"&gt;You can download a trial edition of Data Loader by clicking the following link &lt;a href="http://www.dbload.com/download.htm"&gt;Convert MSSQL to MySQL&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3943814256987060213-7131295310979156039?l=convert-mssql-to-mysql.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://convert-mssql-to-mysql.blogspot.com/feeds/7131295310979156039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://convert-mssql-to-mysql.blogspot.com/2009/06/convert-data-from-ms-sql-server-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3943814256987060213/posts/default/7131295310979156039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3943814256987060213/posts/default/7131295310979156039'/><link rel='alternate' type='text/html' href='http://convert-mssql-to-mysql.blogspot.com/2009/06/convert-data-from-ms-sql-server-to.html' title='Convert data from MS SQL Server to MySQL'/><author><name>AshTiger</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_U36YCLB__Po/Sj-FtSSIEBI/AAAAAAAAAAc/FJ3Tgn5HpkA/s72-c/DataLo1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
