Solved

SQL sever 2008r2 DB migration to MySql engine.

Posted on 2012-04-04
3
302 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 500 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 500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

688 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