C:\> mysql -uroot < uncompressed_file.sqlIf the dump file does not create a database we have to do it. Below we will create a new database called: my_new_db and import into it.
C:\> mysqladmin -uroot create my_new_db C:\> mysql -uroot my_new_db < uncompressed_file.sqlWe can check everything went in all right by doing a few small tests. Log in to the database my_new_db, list all the tables and count how many records are in the table table_name_1.
C:\> mysql -uroot my_new_db mysql> show tables; mysql> SELECT COUNT(1) FROM table_name_1; mysql> exit; C:\>If you are used to using Microsoft products then you may find it difficult to use a command line; you will almost certainly want to use something you are familiar with already - like Microsoft Access! MySQL has an Open Database Connectivity connector (ODBC) which is the databases’s glue to join with other applications in a standards based way. The glue can be downloaded from the MySQL’s ODBC Connector web page. After installation, you can create a Open Database Connectivity data source from the control panel (Control Panel->Administrative Tools->Data Source (ODBC)) which will allow other applications to use this method to access MySQL. Microsoft Access lets you read from an ODBC datasource, so you can now use the front-end tools that your users are used to without them needing to know what kind of database is at the back-end.
Comment from: Dr Stephen Swift [Visitor]
Dear Mr N,
This was very helpful. I had a MySQL dump of a genomic/proteomic database to analyse (www.reactome.org). I have no skills in MySQL, but I do know MS Access. The database dump did indeed not create any databases. The description about how to link to Access was very handy. Once the tables were linked, all I needed was a few lines of MS Access VB code, to copy the linked tables over all “real” tables in another database, and I have now got a version of the database that I can use!
Now the difficult part however - trying to understand the 169 tables! Off to find a biological interpreter…!
Form is loading...