MS SQl versus MYSQL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sebs
Forum Commoner
Posts: 97
Joined: Tue Sep 20, 2005 10:13 am

MS SQl versus MYSQL

Post by sebs »

I created a database in MSSQL.Is there anyway I can import with mysql.With what command from mysql prompt?
Thanks.
sebs
Forum Commoner
Posts: 97
Joined: Tue Sep 20, 2005 10:13 am

Mysql

Post by sebs »

The only way of entering data in my sql is using insert into SOME values OTHER?
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

if its sql wouldnt it be perdy much the same? just read the tables then put them in the new mssql db. easily done
sebs
Forum Commoner
Posts: 97
Joined: Tue Sep 20, 2005 10:13 am

mysql

Post by sebs »

Is there a way to edit the MYSQL table(like in Access or MSSQL)without insert?
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

yes, use the UPDATE command
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

phpmyadmin provides a good web interface for manual editing.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
sebs
Forum Commoner
Posts: 97
Joined: Tue Sep 20, 2005 10:13 am

MYSQLADMIN

Post by sebs »

Thanks
sebs
Forum Commoner
Posts: 97
Joined: Tue Sep 20, 2005 10:13 am

fastest way

Post by sebs »

what is the fastest way to insert tousands of entries in an mysql database?
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Depends on size - phpmyadmin can handle up to about 2MB I think (but it wasn't very reliable - at least in older versions).

MySQL command line has an import function - see the manual.
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Re: MS SQl versus MYSQL

Post by BDKR »

sebs wrote:I created a database in MSSQL.Is there anyway I can import with mysql.With what command from mysql prompt?
Thanks.
Use mysqldump.

As long as the MSSQL tables are allready setup, then a dump of just the data should get the stuff you need.

As for entering it into MSSQL, you're on your own there. However, if you can script to connect and do things with mssql, why not iterate through the file you dumped above run those insert queries into the server you want?

The last, coolest, most l33t solution would be to pipe your dump straight into some mssql utility. I just doubt Microsoft was ever smart enough to make it that easy.

Now if you haven't created the tables, it may get more interesting as there are likely to be differences in MS's SQL and the exact names/equivalents of/for types may (most likely will) have some variation. The easy thing to do is dump your MySQL database with no data (just table creation information) and then run that SQL in MSSQL. Look for the errors then adjust the SQL to something the server likes.

Cheers
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I think several, or all of us, are confused a bit.. Do you want to import data to a MySQL database from MSSQL or import data to MSSQL from MySQL ?
sebs
Forum Commoner
Posts: 97
Joined: Tue Sep 20, 2005 10:13 am

MSSQL

Post by sebs »

From MSSQL to MYSQL
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Re: MSSQL

Post by BDKR »

sebs wrote:From MSSQL to MYSQL
My bad. :oops:
sebs
Forum Commoner
Posts: 97
Joined: Tue Sep 20, 2005 10:13 am

MSSQL

Post by sebs »

I'm sure you are a little confused,for wht do I need that.The problem is I have a very big database,tousands and tousands of contacts that is in MSSQL.I have a Web page in PHP and the server that I wan't to put it on is only having connections to MYSQL(for PHP).Who thought they would dedicat their server of MSSQL to .NET and...
Post Reply