Solved

Connect to SQL server using MySQL

Posted on 2007-12-06
7
724 Views
Last Modified: 2012-08-14
Hi,
 the company i work for has a SQL server to which i only have read access. Is there a way to connect to the sql server using mysql?
I was trying to use Toad for MySQL, but i dont even see a option to remotely connect to the SQL server.

Thanks in advance,

Mooks
0
Comment
Question by:mooklander
7 Comments
 
LVL 25

Expert Comment

by:imitchie
Comment Utility
TOAD is for MySQL only.
Your best option is probably to download the free SQL Server 2005 Express Management Studio (free) which can connect to SQL Server.
0
 
LVL 25

Expert Comment

by:imitchie
Comment Utility
0
 
LVL 8

Accepted Solution

by:
digital_thoughts earned 200 total points
Comment Utility
Not sure about going from MySQL tools to SQL Server, but if you can request a linked server to be added, you could have your MySQL box added and then access data using the OPENQUERY method.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:mooklander
Comment Utility
thanks for the quick response experts. Is there no other alternative to do this with MYSQL. I had already created the database using sql server express, but was asked to try and recreate it in MYSQL.

Digital thoughts,
 Did you mean that i need the MySQL server connected as a linked server in the MS SQL server to achieve this?

thanks,
Mooks
0
 
LVL 25

Assisted Solution

by:imitchie
imitchie earned 200 total points
Comment Utility
Assuming you have installed the MySQL connection drivers, then yes, you can link from MSSQL to MySQL.
If you still have the create script (and not much data), then it's probably easier to recreate it from the script.
0
 
LVL 2

Assisted Solution

by:stavrama
stavrama earned 100 total points
Comment Utility
If you dont have installed sql server on your pc and assuming that you have access, you can do the following in order to export the tables to the new db on mysql.

First of all go and dl the odbc driver for mysql from this link:
http://dev.mysql.com/downloads/connector/odbc/3.51.html

You need to create 2 odbc connections. The first one will be in order to link the sql server tables from mssql to access and the 2nd will be in order to export the tables from access to mysql.

Go to administrative tools-> data sources(ODBC) and click add on the dbase files there. Choose sql server from the list and then click finish. On the new window that will appear, choose a name for your odbc driver and the server in which the sql db is. Click next and then next again. On the new window choose the database you want to use and then click next until it is finished.

The same thing you will do in order to create the odbc connection for mysql. Go again to data sources(ODBC) but this time choose mysql ODBC 3.51 Driver. On the new window fill  the following:

name: The name of the driver
server: Where mysql is
user: root
pass: password
database: the db in which you want to migrate the sql db.

Now open your access, click open file and choose the ODBC databases on file of type. On the new window, go to machine data source and from there choose the odbc driver we created for the access.
Choose the number of tables you want to link and click ok.

Now, left click to a table and choose export. On the new window choose again odbc databases to save as type and then specify the name of the new table that will be exported on your mysql db. Choose again after that the machine data source and this time pick the odbc driver for mysql. Do that for every table and your new db will be ready. I hope that this will help
0
 

Author Closing Comment

by:mooklander
Comment Utility
was unable to try and implement this because of changes to the project. Just wanted to thank you experts for taking your time out for this.
cheers!
Mooks
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Creating and Managing Databases with phpMyAdmin in cPanel.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now