Thread: Access to MySQL

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    53
    Rep Power
    15
    How can I convert a MS Access db to MySQL?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Ontario, Canada
    Posts
    498
    Rep Power
    18
    I'm not sure you can. But, on the plus side, MySQL databases and tables aren't that difficult to create. (I know this, because I used to work with Access/ODBC too, but I've been playing around with MySQL alot lately.)

    ------------------
    To alcohol! The cause of, and solution to, all of life's problems. -- Homer Simpson
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    MO, US
    Posts
    119
    Rep Power
    15
    There IS a way to do it - I had a MS Access database with 17,000 entries and did not want to manually convert it - here's the general way I did it:

    1) Make your db tab-deliminated.
    2) Save it as yourdb.txt or whatever.
    3) Upload it to your server.
    4) Connect to your server with telnet and connect to mysql.
    5) create the database like this:
    mysql> create database yourdb
    mysql> use yourdb
    6) then this is where I forgot - there is a mysql command to import your text file into mysql.

    If anyone knows what I mean I bet this would work. It did for me. Hope this helps -

    Ken
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    114
    Rep Power
    15
    I think you'll still need to create your table definitions and what not, but then you just say:
    mysql>LOAD LOCAL DATA INFILE 'yourdb.txt' INTO TABLE tbl_name;
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jul 2000
    Posts
    669
    Rep Power
    15
    Those are vaild options however if you are new to MySQl, the easiset way would be to downlaod a copy of PHPMyAdmin for www.phpwizard.com and install it on your server. Then export your table as a delimited text file from access. You can then use PHPMyAdmin to easily create a table and import your text file in.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Norcross, GA
    Posts
    458
    Rep Power
    15
    The command to import text files into a mysql database is as follows:

    1) Upload your file (it can be named anything, such as file.dump, or file.sql) to the root directory of your server.

    2) Telnet in, go to the root command prompt.

    3) Type the following (sub your username/pw):

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>

    mysql -u -p dbname < file.dump

    [/code]

    Then, press enter. Mysql will parse file.dump and providing there are no errors, the data will be loaded into the appropriate table within the dbname database.

    HTH,
    Mike
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jul 2000
    Posts
    669
    Rep Power
    15
    mstrembi, that works great if you original file is in mysqldump format, but we are talking about getting data from an access db, which you should ne is not in ready to use format
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Norcross, GA
    Posts
    458
    Rep Power
    15
    A couple weeks ago I converted an access database to what I see now is called 'dump format' (with a text editor), then used the method above to load it.

    On second reading I see that he wants to go straight from access to mysql.. Sorry - I jumped the gun on my reply.
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    Seaside, CA
    Posts
    84
    Rep Power
    15
    Here are two different ways of doing what you want to do:
    http://www.cynergi.net/exportsql

    http://www.phphelp.com/tutorial/usin...-database.html


    ------------------
    From the day we're born, we're running out of time.
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    53
    Rep Power
    15
    Thanx for all your responses, but I am yet confused! All I wanna do is some how get all the data in access db to mysql. I dun wanna do it manually coz that will take me forever. So could someone please write a step-by-step how to for me? Thanx!

Similar Threads

  1. From Access to remote MySQL
    By TimMatthews in forum Database Management
    Replies: 0
    Last Post: February 3rd, 2004, 10:54 AM
  2. Replies: 0
    Last Post: January 30th, 2004, 09:46 PM
  3. database type: mySQL, MS SQL and Access
    By vinyl in forum ColdFusion Development
    Replies: 5
    Last Post: January 27th, 2004, 08:25 PM
  4. MySQL Access from SUN ONE
    By meyerc75 in forum MySQL Help
    Replies: 5
    Last Post: January 24th, 2004, 02:23 PM
  5. Replies: 2
    Last Post: January 5th, 2004, 09:53 PM

IMN logo majestic logo threadwatch logo seochat tools logo