September 24th, 2000, 01:12 PM
How can I convert a MS Access db to MySQL?
September 24th, 2000, 02:32 PM
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
September 24th, 2000, 03:54 PM
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 -
September 24th, 2000, 04:55 PM
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;
September 24th, 2000, 08:15 PM
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.
September 24th, 2000, 08:50 PM
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
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.
September 24th, 2000, 08:58 PM
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
September 24th, 2000, 09:09 PM
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.
September 24th, 2000, 11:53 PM
September 25th, 2000, 12:59 AM
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!