I need PHP code to convert the database. I tried How to convert mysql to SQLite using PHP but it dint have answer
The quickest and easiest way to convert SQLite to MySQL is by exporting an SQL Database to a Dump File, and then importing the SQLite Dump into MySQL Database. You can export an SQLite Database to Dump File using the .dump command. Now, import this Dump File into MySQL using the command shown below.
Download the RebaseData client Java tool . To convert your database using RebaseData, run the following command: Replace file.sql with the path to the MySQL .SQL file you want to convert. The file output.zip will contain a .SQLITE file with your data or the error message if something went wrong.
This modified CREATE TABLE statement will work successfully in SQLite. Open a terminal window. This will open the sqlite command line program and simultaneously open the database file. If the database file doesn't exist, it will create it. Note errors, if any, and modify source .sql file to eliminate errors.
SQLite is an open-source Relational Database Management System (RDBMS). Most of the Relational Databases are based on the Client-Server model, which means that the Database typically runs on a server. However, SQLite is a Serverless Relational Database Management System, also referred to as an Embedded Database.
I finally found its solution.
Save sh file available at
https://gist.github.com/943776
and execute
"./mysql2sqlite.sh DBNAME --databases DBNAME -u DB_USERNAME -pDB_PASSWORD | sqlite3 database.sqlite
"(without qoutes and with "`")
in php file.
Save both files in one folder
Go to phpmyadmin click export database download as sql file.
Download it....
go to your sql lite management software import the .sql file
done...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With