?
Solved

SQL sever 2008r2 DB migration to MySql engine.

Posted on 2012-04-04
3
Medium Priority
?
308 Views
Last Modified: 2012-04-18
Hello:
I have a website that fetches info from SQL server db.
I want to move the current db that serves the website into MySql instead, and map the website to fetch the info from Mysql.

Which version of MySQL should I use?
What is the process for the migration?

Thanks you.
0
Comment
Question by:noamco36
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Assisted Solution

by:Patrick Tallarico
Patrick Tallarico earned 2000 total points
ID: 37808939
This sounds like it could be quite involved depending upon the size of your databases and web site.
As far as the version of Mysql, I don't think there should be too much of an issue with just using the most recent version of the standard  community installation unless you need the cluster reliability.  
http://dev.mysql.com/downloads/mysql/

There is a Mysql migration tool you can use to help move the data from mssql to mysql.  
http://dev.mysql.com/doc/migration-toolkit/en/index.html

As far as the web site, what scripting language are you using?  I would hope that your database calls are referencing some sort of centralized function or class to make sifting through things a bit easier in terms of replacing the mssql requests with mysql requests.  If it is PHP, the mssql and mysql functions are close to identical, so the syntax will not need to be too difficult.
0
 

Author Comment

by:noamco36
ID: 37808990
"As far as the web site, what scripting language are you using?"  

All I know about the website is that they used WordPress framework to built it.

The size of the db is relatively small.
0
 
LVL 6

Accepted Solution

by:
Patrick Tallarico earned 2000 total points
ID: 37809038
Wordpress generally uses PHP, and has it's own mysql database.  You could probably use that installation and just create a new database that mirrors the old ms sql one.  You could still use the mysql migration tool to move the data.  If it is small, then you will probably be able to look directly at the pages that are connecting to the mssql server using an adminstrator login. From there you could adjust the connection parameters for the database calls and you should be able to leave the queries the same for the most part.  

as an example here is the code for the mysql database connection.
http://php.net/manual/en/function.mysql-connect.php

and here is its mssql counterpart.
http://php.net/manual/en/function.mssql-connect.php

Generally the similarities should make this relatively simple if you are familiar with php, but it could be a bit daunting if you are not.

Also you may need to look at the queries that are being sent to the sql server. The query syntax for mssql and mysql differs a bit, so things like restricting output to a defined number of rows would need to be rewritten to match the mysql syntax.  Ex:

mssql:
select top 10 * from table

mysql:
select * from table limit 10

How many different pages do you currently have that request MS sql data?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
In this article, we’ll look at how to deploy ProxySQL.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question