How to use the generated script from SQL 2005 to MYSQL? - mysql

We are converting our database to MYSQL from MSSQL 2005.
Someone told me this is possible by generating a script in MSSQL using Database Publishing Wizard. I already created a script. Then by dragging it to the Query Writer in MYSQL. I am currently using SQLyog for creation of database.
How can I use that script to create a MYSQL file?
I also tried to use demo versions of converting tools but to no avail.
Please help me. =)

There is no simple or quick way to do a task like this. THe two database have differnt syntax and differnt datatypes, etc. I certainly would not trust a converting tool as you may want to make changes to fix bad design choices in SQL server to better choices in MYSQL.
Take your script and then run each section and find where it fails and then look up the correct syntax for mySQL and fix it.
Here is alink to a book you need to have for this conversion project as it wil show the syntax differnences:
http://www.amazon.com/SQL-Nutshell-OReilly-Kevin-Kline/dp/0596518846/ref=sr_1_2?s=books&ie=UTF8&qid=1330382519&sr=1-2

Related

how to get tables, views, etc.. in mysql database server from a firebird database server

There are two different database servers in different platforms; MySql and Firebird.
I need to get db tables from Firebird server (synchronously or not synchronously) to MySql server.
Timing is not that important.
How do I achieve to get, for example; simply a specific database table from Firebird server to Mysql server?
İt will be very helpful if any ideas come, thank you..
So essentially you would need to develop some sort of process that will extract then transform and load the data from FireBird into MySQL. The problem is that both firebird and MySQL does not have real ETL tools included in them by default. MSSQL has for example SSIS. Since you cant access FireBird directly from MySQL code you will need some external tool to do the job.
Thus you will either have to code this tool yourself or use a open source tool.
There are several ETL tools that are open source and for free that you might want to investigate such as Pentaho, CloverETL see this link for more information.
You told you already found a solution to import CSV into MySQL. So the missing piece is Firebird CSV export
Well, those three words entered into Google give you immediate top result as the free FBExport tool. See http://www.firebirdfaq.org/fbexport.php

MySQL phpmyadmin alternatives (mySQL workbench like)

I'm familiar with MS SQL server 2008 and I want to switch to an more open minded/source DBMS;
I found out that phpmyadmin is the most widely used tool to manages mySQL databases but I find it very difficult to work with. In SQL server I was used to create tables from the designer (in diagram -> add new table) and only if I needed some extra features I actually modified the table.
Can I do the same thing from phpmyadmin? I really hate that every time I create a new table to be asked how many rows it will have and there are plenty of options displayed even if I do not use them.
So any alternatives???
P.S. mySQL workbench seems the right tool for me but I think you are not able to create tables from the designer only to edit existing tables. (Correct me if I'm wrong)
You can create table in MySQL workbench using designer interface, If you are looking for alternatives try HeidiSQL or SQLYOG, for more options visit this.
you can create table visually using workbench.
Check out this article
http://net.tutsplus.com/tutorials/databases/visual-database-creation-with-mysql-workbench/
I recommend Chive for a simple web based solution
Try Webdbadmin.
http://www.webdbadmin.com is what I recommend you.
Works like a desktop app, but it's web-based.

How I do to "migrate" the structure from aspnetdb.mdf to a mysql database

I'm creating a new Asp.Net MVC 3 application. Visual Studio does a lot of the job of create the database and initial layout. Very nice! I will upload that initial files to my server, but I want that it runs using the MySql database on the server.
There's some quick/easy way to do it? I'm not worried about the data, just the structure of the tables, and the connection/configuration changes.
Thank you very much!
You can export any MS-SQL database as a Script (Sql Server manager).
Fix it up to make it compatible.
But you will also need a Membership provider, look around if there exist any for MySql, otherwise you'll have to create one (movie).
There are a number of tools listed in "Migrating from Microsoft SQL Server and Access to MySQL".
Or (assuming that you're using column types that exist on both platforms) you can write a script to convert a schema dump from SqlServer into MySQL (or do the conversion by hand in a text editor). Even better yet, you can write a program program to read the INFORMATION_SCHEMA table from SqlServer and produce the necessary CREATE TABLE... statements in mysql. Lots of options.

Getting MySQL code from an existing database

I have a database (mdb file) that I am currently busy with. I would like to know if it is possible to generate MySQL code that would be used to create this database?
There are a couple of tools you can look at to try to do the conversion.
DataPump
Microsoft DTS (Nos Called SQL Server Integration Services)
Other option might be generate MySQL code from Access' DB MetaData you can access from JDBC, ODBC, ADO.NET or any other database access technology with metadata support. For this option you need to generate a piece of code (script). So it will only make sense if your access DataBase has a lot of table with a lot of columns or if you are planning to do this task several times.
Of course, using one of the mentioned tools will be faster if it works.
You can certainly write DDL to create and populate a MySQL database from the work that you've already done on Microsoft Access. Just put it in a text file that you execute using MySQL batch and you're all set.
If you intend to keep going with developing both, you'll want to think about how you'll keep the two in synch.

MySQL database change tracking

What tools are you using to track changes in your MySQL database? Currently I'm in a project where we use a plain text-file (version controlled via SVN) in which we manually add SQL statements when making changes to the database.Many of the changes magically disappears every now and then, and we are now looking for a better way to change track our database.
EDIT:
One thing that I forgot to mention, we are using stored procedures and functions, so it's not only the database structure that we want to track changes on / version controll.
There is a simple solution:
Make all changes to the database schema and static data via scripts
Version control the scripts
Toad for MySQL has a great schema comparison tool
http://www.quest.com/toad-for-mysql/
I think you need something like this (I test it for Firebird and it works very well) :
http://www.upscene.com/products.audit.index.php
I thought there was a MySQL version but NO :(
for MySQL, I see just this :
http://solutions.mysql.com/solutions/partner.php?partner=1532
But if it is just for development, I think that the answer given here is good
mysql-diff compares tables, but not stored procedures yet.