Re: export flat file db into mysql?



Cynthia wrote:

> Hi all, I know this can be done, but I just can't seem to find a way
> to do it (that I can use myself, or understand).
>
> I use Mac and I've got some databases on my hosting company's MySql
> server that I use. I would like to take a database that's on my
> website and change it over to use the MySql database. It's currently
> using a flat file with pipes (|) to delineate each field.
>
> The "converters" I've found online are all for Windows, and the one
> that I found which would run on Mac, I just can't get it to work. For
> some reason it won't connect to the server. It's called Navicat.
>
> I do have PhpMyAdmin set up (version 2.5.5), but I can't find any way
> to do this.
>
> This database I've got has grown quite huge, and putting all of the
> info in by hand would take a very long time. I know there's got to be
> a way to do it using a Php script that I can install on my site. I
> just haven't had success in finding the right script.
>
> Does anyone know of something that might help? (Keep in mind, I'm not
> a programmer, though I can install Php scripts just fine; and I don't
> have full access to the MySql server, just through PhpMyAdmin)
>
> Thank you very much. :)

phpMyAdmin might be helpful in this case. Create a table with the
column order you have in your text file. Then, in the "Structure"
section of the table, open the link titled "Insert data from a text
file into the table"; it's at the very bottom of the page. Here you can
upload your file from your local computer and select how the text in it
should be treated.

>From what I can tell, this function acts like the LOAD DATA or LOAD
DATA LOCAL methods from from command line as mentioned in a previous
post in this thread.

--
Kim André Akerø
- kimandre@xxxxxxxxxxxxxxxxxx
(remove NOSPAM to contact me directly)
.



Relevant Pages

  • export flat file db into mysql?
    ... I use Mac and I've got some databases on my hosting company's MySql ... I would like to take a database that's on my website ... reason it won't connect to the server. ... to do it using a Php script that I can install on my site. ...
    (comp.lang.php)
  • Re: [PHP] Cannot access file on Network Drive (Windows 2003)
    ... I have some files sitting on a Network Drive accessible on the Windows 2003 ... Server. ... But my php script is not able to open the files. ... It is not able to open the database. ...
    (php.general)
  • Re: phpMyAdmin and MySQL
    ... >I'm using PHP and MySQL to create websites and phpMyAdmin to manage ... >file in the other server to replicate the database. ... ignoring the rest of the SQL file. ...
    (alt.php)
  • uniqid() function
    ... records in a database. ... Is it possible for two IDs to have the same ... value if the PHP script is on only one server? ...
    (comp.lang.php)
  • different result phpMyAdmin and php script
    ... My phpMyAdmin does not show all records in the database when I choose ... the browse tab for the table. ... What I see is one record, which I inserted with phpMyAdmin itself. ... will be returned when using SELECT * from within a php script). ...
    (alt.php)