Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 07-09-2009
Member
 
Join Date: Aug 2009
Posts: 51
How to convert .db file to MySQL database

I am having a file which is of extension .db. I want to convert it to MySQL database. Can you tell me how to convert .db file to MySQL database? How can I see this database file: using any database tool or viewer?
Reply With Quote
  #2  
Old 07-09-2009
Member
 
Join Date: May 2008
Posts: 685
Re: How to convert .db file to MySQL database

PHP Code:
<?php

function convertDB($delimeter '\t'$filename$db['hostname'], $db['username'], $db['password'], $db['database'], $db['table'] )
{

    
$cid mysql_connect$db['hostname'], $db['username'], $db['password'] ) or die('MySQL connection failes' );
    
mysql_select_db$db['database'], $cid ) or die('Unable to find database' );

    
ini_set('MAX_EXECUTION_TIME'900); 

    
$file file($filename);

    foreach (
$file as $line)
    {
        
$array explode($delemeter$line);
        
$count count($array);

        for (
$x=0$x<$count$x++)
        {

            
$array[$x] = trim(addslashes(str_replace'|'''$array[$x] ) ) ); 

            if( ( 
$x+)!= $count )
            {
                
$comma ',';
            }

            
$values "'".$array[$x]."'".$comma;

        }

        
$result mysql_queryinsert into ' . $db['table'] . ' values ' . $values . ' );, $cid);
    }
}
?>
The above PHP code should convert your .db file to MySQL database.
Reply With Quote
  #3  
Old 07-09-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: How to convert .db file to MySQL database

MSSQL to MySQL Database Converter 2.0.1.5 is the best utility for you. MSSQL to MySQL Database Converter is an automated database migration solution capable of converting bulk database records of MSSQL into MySQL database records. MSSQL migration program checks data comparison before conversion process that migrate data attributes structures of tables. Data base converter also concentrates on other properties like (Primary/Foreign keys, indexes, null values, constraints, range, domains) during conversion from MSSQL to MySQL record format.
Reply With Quote
  #4  
Old 07-09-2009
Member
 
Join Date: May 2008
Posts: 2,008
Re: How to convert .db file to MySQL database

Use MS Access DB to MySQL Conversion tool 2.0.1.5 to convert MS Access database tables into MySQL database server. MS Access database converter software provides facility to migrate Microsoft Access database file into most popular MySQL database server format. MS Access to MySQL database synchronization software is an advanced tool to convert password protected MS Access MDB files into MySQL file formats. MS Access database conversion program safely merge converted MS Access database records with existing MySQL database without any data loss. MS Access to MySQL database converter accurately transforms password protected Access db file with all necessary property including null value, default value etc.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to convert .db file to MySQL database"
Thread Thread Starter Forum Replies Last Post
How to connect PHP to mySQL Database Nathen Tips & Tweaks 2 17-07-2011 03:49 AM
MySQL database log file maintenance little-Jacqueline Software Development 4 27-02-2010 04:12 AM
Mysql Error : Can't connect to local mysql server through socket ' var lib mysql mysql.sock' 2 roshan45 Software Development 3 07-11-2009 09:36 PM
Restoring MySQL database Sean J Software Development 5 18-02-2009 01:46 PM
convert filemaker pro database to access database Czack MS Office Support 3 15-04-2007 01:06 AM


All times are GMT +5.5. The time now is 08:40 PM.