Topic: [Solved] Switching from SQLite to MySQL
Hi, I would like to take my web page to another web hosting company, but they don't have SQLite support. Do you know any way how could I convert my heavily modified SQLite forum/page to MySQL? Thanks
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → [Solved] Switching from SQLite to MySQL
Hi, I would like to take my web page to another web hosting company, but they don't have SQLite support. Do you know any way how could I convert my heavily modified SQLite forum/page to MySQL? Thanks
unless you have written some specific sqlite queries it should just be a matter of transferring the data from the sqlite database to the mysql one.
unless you have written some specific sqlite queries it should just be a matter of transferring the data from the sqlite database to the mysql one.
No, but I have no idea how could I do that, I was searching for some software but i didn't find anything.
It's not so difficult, but yes, it's a bit tricky due to sqlite being typeless. Punbb database schema is the exact same if you use sqlite or mysql, it couldn't be other way anyway.
So, this is what i suggest for unexperienced users:
1. Create a fresh installation of punbb with a mysql database.
2. Using a mysql management tool like pypmyadmin, sqlyog, whatever, generate a SQL file containing the 'create table' statements. Save that file.
3. using a sqlite management tool create a sql file with the insert statements and save it too.
4.create a new empty database on your mysqlserver.
5.Populate your database, use the first sql file to create the tables and the last one to insert the data on them.
6.delete the instalation and database created on point 1
It's not so difficult, but yes, it's a bit tricky due to sqlite being typeless. Punbb database schema is the exact same if you use sqlite or mysql, it couldn't be other way anyway.
So, this is what i suggest for unexperienced users:
1. Create a fresh installation of punbb with a mysql database.
2. Using a mysql management tool like pypmyadmin, sqlyog, whatever, generate a SQL file containing the 'create table' statements. Save that file.
3. using a sqlite management tool create a sql file with the insert statements and save it too.
4.create a new empty database on your mysqlserver.
5.Populate your database, use the first sql file to create the tables and the last one to insert the data on them.
6.delete the instalation and database created on point 1
Well, that sounds damn complicated. I came up with an idea, that I could modify my config.php, and covert the sqlite database to mysql with a program or php script or something. What you think?
The solution you pointed would work if you were migrating from another DB system than sqlite.
The problem is that SQLITE is typeless am mysql is not.
In a mysql database, every table column has a datatype while in a slite it does not.
This makes it impossible to create a tool that would convert a sqlite database into other 'type' of database. You need to know the database structure.
The procedure i described is not that difficult, if you maintain a forum that's a actually an opportunity to try out stuff and learn a bit.
Otherwise you will have to fix somebody to do that for you.
I will do what you said, but I would rather copy the create table statements from install.php. I find it easier but actually it isn't
Well, I was able to copy users, PM-s and other stuff but but I had no luck with forums and posts. I recrerated them in mysql but nothing shows up on forum index.
Ok, I made some mistakes, now it's working. Thank you pedrotuga for your help.
Nice to see that it worked well.
It's also nice to have a actual successful migration testimonial.
PunBB Forums → PunBB 1.2 troubleshooting → [Solved] Switching from SQLite to MySQL
Powered by PunBB, supported by Informer Technologies, Inc.