Jump to content

This topic is 7468 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

I am not sure if this is the right place to post this question but here goes.

I use FMP extemsively an want to make databases available on the internet but I am not going to be running a server myself. I have an account with a web host and most of my clients are using the same host. I have MySQL working on my account and I have full functionality of PHP/MySQL form what I have tested and seen so far. Is there a way to take FMP databases and set up, export or format so the data can be accesses as a table using PHP/MySQL? I am a novice when it comes to MySQL, I have set up phpBB and have some working knowledge but not alot.

Can someone give me some direction as to how I can bring these databases online? tutorials? samples, etc?

Thanks in advance. If there is a better forum for questione please let me know and/or move this post accordingly.

Robert

Posted

I have found this website: http://www.fmpromigrator.com/ where it appears a software that can be useful, I do not have knowledge on this software, but it is possible that later it must use it.

You can download a version demonstration.

Posted

Hi, Robert! I'm not exactly a pro either, but I don't think transfering DATA from FileMaker to MySQL would be difficult at all.... (pause... 3 minutes later). Huh. I guess it's a little harder than I thought. phpMyAdmin did not have an IMPORT feature as I expected... only an EXPORT feature. There are other utilties to do this for you, but I found a website that tells you how to do it from using php http://www.blue105.com/internet/support/mysql_offline.html#import if you want to go that route.

--ST

Posted

Why you don't use some ODBC functions to connect to your MySQL host ? In this case, you probably will able to syncronise the two databases.

If these solution doesn't work, there are lot of solutions to do such of think, because MySQL query's aren't difficult to undestand.

Posted

Hi, Robert !

Acutally, it turns out that PHPMYADMIN does have an import feature after all... it just wasn't listed as a main command/function. I was working in it today when I noticed there was an INSERT DATA FROM A TEXTFILE INTO TABLE option when you browse the table (the option is at the bottom of the page).

If you are not familiar with phpMyAdmin, it is an open source utility that gives access to your MySQL databases via the web. You can create and edit databases, tables, and fields; you can browse and edit table data; and now I see you can import and export data... IMO, it's great. I think it's available from sourceforge.net. It's a little harder to install than phpBB, but not much... you have to use a text editor to change the configuration file a little but there's no coding or compiling invovled. MACWORLD even had an article on installing and using it which may save you some lengthy installation instruction reading otherwise. Your host may already have it installed on their system, but if not, you can install it locally just to fix your database. Just export your FM data as text and use the PHPMYADMIN utility to import the data into your MySQL table... just make sure you set up the table beforehand.

--ST

LOL !! 10 kinds of people: those who understand binary and those who don't... nice!

Posted

So, if you would go in this way :

You must to export your data as XML file, and perhaps you should convert it with an XSLT file to output a MySQL command file who will be needed to execute MySQL query's to update your MySQL database, even you use phpMyAdmin.

I'm not sure that the import function of phpMyAdmin can work with another format than MySQL query's.

It's not hard to do, but it could be taken a lot of time...

  • 2 months later...
Posted

I realize this is an old post but It's very relevant to me today. :smirk:

I'm a total newbie at this. I'm used to going into DreamWeaver MX have having the connection string and DB already there. How do you set up MySQL database on the web hosting server (it is Unix with PHP/MySQL and already has phpMyAdmin installed) for the first time? I have used the tool online to create an empty MySQL database. I have used FMP Migrator to migrate the FMP6 data and it created several files. I have also (for good measure) exported the FMP6 to .csv file. I have all this components but I don't know what to do with them from here.

Any help is greatly appreciated!

Posted

Thank you Garry! Do I have to create the tables in the MySQL db on the server before importing the CSV? I though it might be necessary to build the table with the fields I wanted to import and got this error. Any suggestions?

________________________________________________________________________________________________

Error

SQL-query

Posted

Hi, Joie! I believe you need a ";" after the CREATE statment, i.e. CREATE TABLE `test` ( ... );

I still do not understand when you need them and when you don't, but my .PHP file has the ";" in the SQL string so I'd give it a try and see if your error goes away.

--ST

P.S. YES, I believe you do have to create the table first. That SQL command should work, but you can create the table and the table fields from phpMyAdmin rather than using SQL commands. In fact, sometimes that's what I do so phpMyAdmin can show me the SQL commands I need to compose in PHP.

Posted

I don't think that you should have a qoute ' around the table name and the field names. Also, I don't think that fieldnames can have spaces.

Two types of files can be imported into MySQL. One is a file with commands such as CREATE and INSERT. The other is pure data (delimited with commars, tabs, etc).

To import the pure data file you will need to create the tables first. This could be done with the import of a file which just creates the tables. The pure data file will need to be uploaded to your account on the server then you will need to use the "LOAD DATA..." SQL command/query.

Hope this helps.

Garry

Posted

Garry,

I was kinda concerned about the spaces in the names myself.

"To import the pure data file you will need to create the tables first. This could be done with the import of a file which just creates the tables."

Could you clarify about this file which will create the tables? This is the first time I've ever used MySQL or phpMyAdmin. Do I need to create this file in MySQL? I tried to install MySQL on my computer (Mac 10.3.5) and after the install, which was successful) I could not even find it in the Application folder or by doing a find for "mysql". I swear I'm inching along with this project by clues alone. The documentation on the net is pure gibberish at worst and meant for people who don't need it at best!

Posted

To access MySQL on your Mac you can either use the "Terminal" or use something like "phpMyAdmin". You can even get applications which give a GUI for access to MySQL; search the OS X downloads page for "MySQL".

I would create the tables directly through phpMyAdmin, unless you already have them eleswhere. Then you can try to import the CSV through the phpMyAdmin interface.

All the best.

Garry

Posted

Garry,

Thanks so much for your continued help! I got the tables into MySQL on the server using a GUI MySQL free program called Cocoa MySQL. I've tried to import the CSV file using phpMyAdmin and the below error is what I get. Any ideas? Thanks again!

_______________________________________________________________________________

Error

SQL-query

Posted

Looks like the "LOAD DATA" command is not allowed for that version of MySQL. (A bit strange!)

You may be able to do it from "Cocoa MySQL".

In the past, when this command has not been available, I've written a small php script which loads tables from CSV/FM data. This would be relatively easy!

All the best.

Garry

Posted

Success! I finally was able to get it to import with Cocoa MySQL but it took several tries to get it to work. I think this program is a little buggy! It's version 0.5 and free. What can you expect... Thanks for all your help. I don't know what I would have done without you!

This topic is 7468 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.