Professional Web Applications Themes

Importing DB using MySQL, PHPMyAdmin - MySQL

I've read a lot of posts on how to do this, and so far, it seems the most popular ideas are: 1) Use the MyODBC to run the import via ODBC connection. I tried to do this, but ran into a bunch of errors (probably because I didn't do it right; was confused as to whether I needed to set up Machine Data source or DSN, etc. via Access' export menues). In fact, if anyone knows the order or menu options to do for this, I'd appreciate it. But, in the interest of time, I went with option 2... 2) ...

  1. #1

    Default Importing DB using MySQL, PHPMyAdmin

    I've read a lot of posts on how to do this, and so far, it seems the most
    popular ideas are:

    1) Use the MyODBC to run the import via ODBC connection. I tried to do
    this, but ran into a bunch of errors (probably because I didn't do it right;
    was confused as to whether I needed to set up Machine Data source or DSN,
    etc. via Access' export menues). In fact, if anyone knows the order or menu
    options to do for this, I'd appreciate it. But, in the interest of time, I
    went with option 2...

    2) Export all Access tables to text-delimited, using tabs as separators,
    setting text qualifiers to NONE, and putting field names in first row.
    However, when I use the Query window (in the left pane of PHPMyAdmin) and
    browse to the text file to import, I get SQL errors like:

    #1064 - You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to use near...

    ....and then a list of some data values from the table.

    This happened the first time, I assume, because I have a bunch of quotes and
    HTML in some memo field values (this db was previously an ASP database
    backend for a website). The error showed the memo field value, and
    highlighted words which I assume must be reserved words for MySQL or
    PHPMyAdmin or MySQL like "function" and "value." I also have quotes in the
    field data, as I mentioned, because there is html in there for links,
    quotations for spoken words, etc.

    The error I got above was when I tried using text qualifiers of double
    quotes ("), and THAT error showed the row of field names.

    So, is the problem that:

    1) I have reserved words in my field names and memo field data as well as
    quotes and html code in the field data (like a field name being Function and
    text in the field having words like "value" and "and", and also quotes and
    html like "..See more info at <a href="blahblah.com">next page</a>")

    2) I'm not doing the export right from Access

    3) I'm not doing the import right in PHPMyAdmin

    4) A combination of all the above.

    I am running Apache2Triad 1.5.4 on a Windows XP Home machine (which uses PHP
    5 and MySQL 5) and using PHPMyAdmin 2.7.

    I have a rather large Access database called "BC25.mdb" and am just trying
    to get this converted to MySQL so I can start learning PHP.

    I'm a TOTAL newb with all this stuff; Apache, MySQL, and PHP. The
    apache2triad seems to be working fine (control panel shows all services
    working), and php appears to be working too (I can get hello world and
    phpinfo() and all that to work on test php page).

    If anyone has any advice, stories, suggestions, etc., I would GREATLY
    appreciate it.

    Any and all help is welcome and appreciated, and thanks for reading.





    NewbieSupreme Guest

  2. #2

    Default Re: Importing DB using MySQL, PHPMyAdmin

    In MS-Access, you can create a "linked table" that is linked to an ODBC
    connection. It did not work with me either at first, but there was a
    setting that had to be corrected by right-clicking the linked table.

    You can also create a pass-through query. Just create a query, right
    click it and set the type to pass-through, and click the menu
    View->Properties. You can enter the ODBC connect string there.
    Pass-through queries pass the SQL directly to MySQL. "Normal" queries in
    MS Access run in Access itself.

    NewbieSupreme wrote:
    > I've read a lot of posts on how to do this, and so far, it seems the most
    > popular ideas are:
    >
    > 1) Use the MyODBC to run the import via ODBC connection. I tried to do
    > this, but ran into a bunch of errors (probably because I didn't do it right;
    > was confused as to whether I needed to set up Machine Data source or DSN,
    > etc. via Access' export menues). In fact, if anyone knows the order or menu
    > options to do for this, I'd appreciate it. But, in the interest of time, I
    > went with option 2...
    >
    > 2) Export all Access tables to text-delimited, using tabs as separators,
    > setting text qualifiers to NONE, and putting field names in first row.
    > However, when I use the Query window (in the left pane of PHPMyAdmin) and
    > browse to the text file to import, I get SQL errors like:
    >
    > #1064 - You have an error in your SQL syntax; check the manual that
    > corresponds to your MySQL server version for the right syntax to use near...
    >
    > ...and then a list of some data values from the table.
    >
    > This happened the first time, I assume, because I have a bunch of quotes and
    > HTML in some memo field values (this db was previously an ASP database
    > backend for a website). The error showed the memo field value, and
    > highlighted words which I assume must be reserved words for MySQL or
    > PHPMyAdmin or MySQL like "function" and "value." I also have quotes in the
    > field data, as I mentioned, because there is html in there for links,
    > quotations for spoken words, etc.
    >
    > The error I got above was when I tried using text qualifiers of double
    > quotes ("), and THAT error showed the row of field names.
    >
    > So, is the problem that:
    >
    > 1) I have reserved words in my field names and memo field data as well as
    > quotes and html code in the field data (like a field name being Function and
    > text in the field having words like "value" and "and", and also quotes and
    > html like "..See more info at <a href="blahblah.com">next page</a>")
    >
    > 2) I'm not doing the export right from Access
    >
    > 3) I'm not doing the import right in PHPMyAdmin
    >
    > 4) A combination of all the above.
    >
    > I am running Apache2Triad 1.5.4 on a Windows XP Home machine (which uses PHP
    > 5 and MySQL 5) and using PHPMyAdmin 2.7.
    >
    > I have a rather large Access database called "BC25.mdb" and am just trying
    > to get this converted to MySQL so I can start learning PHP.
    >
    > I'm a TOTAL newb with all this stuff; Apache, MySQL, and PHP. The
    > apache2triad seems to be working fine (control panel shows all services
    > working), and php appears to be working too (I can get hello world and
    > phpinfo() and all that to work on test php page).
    >
    > If anyone has any advice, stories, suggestions, etc., I would GREATLY
    > appreciate it.
    >
    > Any and all help is welcome and appreciated, and thanks for reading.
    >
    >
    >
    >
    >
    Dikkie Dik Guest

Similar Threads

  1. phpMyAdmin MySQL proble,
    By Dave Moore in forum MySQL
    Replies: 3
    Last Post: October 13th, 08:35 AM
  2. Hosting Company CF/MySQL/Phpmyadmin
    By Boiler2005 in forum Macromedia ColdFusion
    Replies: 6
    Last Post: March 8th, 11:54 AM
  3. phpMyAdmin and MySQL
    By max in forum PHP Development
    Replies: 5
    Last Post: December 23rd, 06:53 AM
  4. #26208 [Fbk->Ver]: phpmyadmin-2.5.4 + mysql-4.0.15 = crash
    By iliaa@php.net in forum PHP Development
    Replies: 0
    Last Post: November 17th, 11:24 PM
  5. Problems with phpMyAdmin and mySQL
    By Michael Forster in forum Linux Setup, Configuration & Administration
    Replies: 2
    Last Post: August 21st, 05:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139