Importing phpBB data into MySQL

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
lavalamp213
Registered User
Posts: 351
Joined: Fri Apr 20, 2018 12:48 pm

Re: Importing phpBB data into MySQL

Post by lavalamp213 »

Thank you!
warmweer wrote: Tue Jun 08, 2021 2:45 pm Then a printscreen of the file/directory structure inside public_html would have been more informative
Sorry, what is printscreen? You mean like a screenshot?

In order to upgrade you'll need to upgrade the php version.
Frankly you don't need to have your board up and running in order to upgrade it (although if you need to set the style to default prosilver, language to British English and disable extensions before upgrading, then you will need to access your current (copy of) board with a suitable php version
Sorry I wasn't clear what I was trying to do.

My board is up and running, but I want to make an offline copy of it and practice the upgrade, make sure everything goes as smoothly and fast as possible when I do it for real.
That's why I'm trying to set up this XAMPP. I'm thinking it's probably a lot more trouble than just doing the upgrade but I've been advised that I should have this "test forum" for a long time so I'm finally trying to get that sorted.

What I was really wondering is to create the test board, should I use the same old php version that it is currently running on to get an accurate picture of the upgrade process.
User avatar
lavalamp213
Registered User
Posts: 351
Joined: Fri Apr 20, 2018 12:48 pm

Re: Importing phpBB data into MySQL

Post by lavalamp213 »

david63 wrote: Tue Jun 08, 2021 8:51 am That error is saying that the credentials for accessing the database are not the same as those in your config.php file. Did you change them when you copied your live board to XAMPP?
I did not. Should I have?
User avatar
warmweer
Jr. Extension Validator
Posts: 11235
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Importing phpBB data into MySQL

Post by warmweer »

lavalamp213 wrote: Tue Jun 08, 2021 3:31 pm
david63 wrote: Tue Jun 08, 2021 8:51 am That error is saying that the credentials for accessing the database are not the same as those in your config.php file. Did you change them when you copied your live board to XAMPP?
I did not. Should I have?
Yes, because your database on XAMPP is not the same one as on your live host. The contents are probably the same, but not the database name, nor password.

Added:
Did you create a new database on your XAMPP and then import your board database?
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5871
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Importing phpBB data into MySQL

Post by thecoalman »

lavalamp213 wrote: Tue Jun 08, 2021 1:36 pm So they have to match what is in the config.php?
The MySQl user created in XAMPP does does not have to match what is in config.php , it just makes things easier. If you download config.php from server it works in XAMPP, if you upload to live server it works there.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
lavalamp213
Registered User
Posts: 351
Joined: Fri Apr 20, 2018 12:48 pm

Re: Importing phpBB data into MySQL

Post by lavalamp213 »

warmweer wrote: Tue Jun 08, 2021 3:38 pm
Did you create a new database on your XAMPP and then import your board database?
I created the database first. Then I copied the phpBB folders and files into the htdocs folder.

This is what the instructions said to do.

By "copy the files" I took that as drag and drop them in, which is what I did. So not a proper "import" I guess.

I then imported the sql file.

I was a little confused about that though because it said "Import the phpBB data into MySQL."
I selected the MySQL database for that.

Not sure that was correct.
User avatar
lavalamp213
Registered User
Posts: 351
Joined: Fri Apr 20, 2018 12:48 pm

Re: Importing phpBB data into MySQL

Post by lavalamp213 »

thecoalman wrote: Tue Jun 08, 2021 6:53 pm The MySQl user created in XAMPP does does not have to match what is in config.php , it just makes things easier. If you download config.php from server it works in XAMPP, if you upload to live server it works there.
I'm all for whatever is easier.
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52768
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Importing phpBB data into MySQL

Post by stevemaury »

stevemaury wrote: Tue Jun 08, 2021 1:02 pm In XAMPP, the default database user is "root" (without quotes) and no password. Try that in config.php.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
lavalamp213
Registered User
Posts: 351
Joined: Fri Apr 20, 2018 12:48 pm

Re: Importing phpBB data into MySQL

Post by lavalamp213 »

stevemaury wrote: Wed Jun 09, 2021 12:39 am
In XAMPP, the default database user is "root" (without quotes) and no password. Try that in config.php.
Hi- Thank you- I did see this earlier in this thread and wanted to try it - but I wasn't sure (didn't know) how to enter "no password" in the config.
User avatar
Prosk8er
Registered User
Posts: 1744
Joined: Sun Mar 12, 2006 3:30 am
Location: Rochester, NY
Name: Tyler
Contact:

Re: Importing phpBB data into MySQL

Post by Prosk8er »

if you use root as the user the password would be entered like this

Code: Select all

$dbpasswd = '';
in config.php since by default xampp doesn't use a password for root user
User avatar
lavalamp213
Registered User
Posts: 351
Joined: Fri Apr 20, 2018 12:48 pm

Re: Importing phpBB data into MySQL

Post by lavalamp213 »

Thank you everyone.

I did a fresh install this morning and used the information from my config.php to set up my database name, username and password.

It APPEARS that has worked except now I am getting another error message that seems to be regarding the data backup:
General Error
SQL ERROR [ mysqli ]

Table 'cultofta_ss_dbname8d1.ss_dbprefixusers' doesn't exist [1146]

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
When I look at the tables that imported, it looks like only half of them did. There are 90 tables in my data backup and only the first 45 loaded.

Initially, I tried importing the table that the error message named, but it did not work. I tried importing the whole thing again, did not work.

Each time I got this message after the import attempt:
Static analysis:
1 errors were found during analysis.

1. Missing expression. (near "ON" at position 25)

SQL query: Copy  Edit
SET FOREIGN_KEY_CHECKS = ON;
MySQL said: 
#2006 - MySQL server has gone away
is there somewhere in the php.ini that limits the number of tables or something? Or what could be preventing my whole data backup from loading?
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26508
Joined: Fri Aug 29, 2008 9:49 am

Re: Importing phpBB data into MySQL

Post by Mick »

I wonder, did you follow the relevant parts of Knowledge Base - Transferring Your Board to a New Host or Domain?
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
User avatar
warmweer
Jr. Extension Validator
Posts: 11235
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Importing phpBB data into MySQL

Post by warmweer »

lavalamp213 wrote: Wed Jun 09, 2021 11:32 am It APPEARS that has worked except now I am getting another error message that seems to be regarding the data backup:
General Error
SQL ERROR [ mysqli ]

Table 'cultofta_ss_dbname8d1.ss_dbprefixusers' doesn't exist [1146]

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
Where does that database backup come from? How did you make that? If you're not familiar with phpMyAdmin, take a database backup using the phpBB backup feature.
The tables in the database (backup) should all have names starting with "phpbb_" (or just the prefix you used (you can see that in the config.php).
The second part of the table_name is descriptive of the purpose of that table: e.g. phpbb_users, phpbb_forums, etc...
The name of the table you're trying to import is very strange to say the least (unless you table prefix = ss_dbprefix).
To avoid confusion you should use the underscore at the end of the prefix

A simple way to create a copy of your board on local host is :
1. install a new board on localhost using the phpBB fileset and running install (same version as your board) using the same table _prefix as the one on your live board. That will create a valid config.php on your localhost.
2. copy all your files from you live board to your localhost installation but not the config.php, nor the contents of /cache.
3. copy the database backup from your live board to your /store if you haven't done so yet
4. log in to your localhost board and restore the database backup you just copied using the phpBB restore system.

If you can't login it's probably because you have force server url set to ON so perhaps you should check that and temporarily edit that before making the backup.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Importing phpBB data into MySQL

Post by david63 »

warmweer wrote: Wed Jun 09, 2021 12:05 pm The name of the table you're trying to import is very strange to say the least (unless you table prefix = ss_dbprefix).
I wonder if it may have come, at some point, from a "one click" hosts install?
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
warmweer
Jr. Extension Validator
Posts: 11235
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Importing phpBB data into MySQL

Post by warmweer »

david63 wrote: Wed Jun 09, 2021 12:10 pm
warmweer wrote: Wed Jun 09, 2021 12:05 pm The name of the table you're trying to import is very strange to say the least (unless you table prefix = ss_dbprefix).
I wonder if it may have come, at some point, from a "one click" hosts install?
Could be, but surely a host would use an underscore to show the distinction between prefix and descriptive part of the table_name. Having said that - I've seen very strange names with host installs ;-)
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
lavalamp213
Registered User
Posts: 351
Joined: Fri Apr 20, 2018 12:48 pm

Re: Importing phpBB data into MySQL

Post by lavalamp213 »

Mick wrote: Wed Jun 09, 2021 11:36 am I wonder, did you follow the relevant parts of Knowledge Base - Transferring Your Board to a New Host or Domain?
I think so. I used and acp backup tho. Should have used the phpmyadmin one.
Post Reply

Return to “[3.2.x] Support Forum”