Mailing List Archive

upbrade database mysql 5.5.62 -> MariaDB 10.3.34
Hello,

I'm trying to upgrade/migrate my mediawiki from my old Ubuntu VM 14.04
to a new Ubuntu VM 20.04. The detail of the components are below. I
managed to set up a new mediawiki 1.37.2 with MariaDB at the new VM and
copied images directory tree and converted LocalSettings.php to make it
workable but when I restored mysql DB into mariaDB with "mysql -u root
-p toshiwiki(my DB name) < toshiwikibackup.sql", I got "Database error"
at the main page with the detail below:

[a50bfc1261fc29c06a343aec] 2022-04-08 05:32:47: Fatal exception of type
"Wikimedia\Rdbms\DBQueryError"

Can someone tell me where to start debugging or fixing my database to
let MariaDB to understand the imported DB properly? I'm willing/wanting
to learn MySQL/MariaDB more to understand the SQL command and DB
structure to be able to fix problem like this. I'm guessing I need to
modify mysqldump file before restoring it. But just don't know where to
start.


Thanks,


Toshi

***

Old environment:

Ubuntu 14.04

Mediawiki 1.26.0

PHP 5.5.9

MySQL 5.5.672


New environment:

Ubuntu 20.04

Mediawiki  1.37.2

PHP  7.4.3

MariaDB  10.3.34

ICU  66.1

--
Toshi Esumi
web: http://www.toshiesumi.com
blog: http://toshiesumi.blogspot.com
_______________________________________________
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org
To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
Re: upbrade database mysql 5.5.62 -> MariaDB 10.3.34 [ In reply to ]
Hi,

On Thu, 2022-04-07 at 22:45 -0700, Toshi Esumi wrote:
> [a50bfc1261fc29c06a343aec] 2022-04-08 05:32:47: Fatal exception of type
> "Wikimedia\Rdbms\DBQueryError"
>
> Can someone tell me where to start debugging

See https://www.mediawiki.org/wiki/Manual:How_to_debug

Cheers,
andre
--
Andre Klapper (he/him) | Bugwrangler / Developer Advocate
https://blogs.gnome.org/aklapper/
_______________________________________________
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org
To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
Re: upbrade database mysql 5.5.62 -> MariaDB 10.3.34 [ In reply to ]
On Fri, Apr 8, 2022 at 1:47 AM Toshi Esumi <email2@toshiesumi.com> wrote:
>
> I'm trying to upgrade/migrate my mediawiki from my old Ubuntu VM 14.04
> to a new Ubuntu VM 20.04. The detail of the components are below. I
> managed to set up a new mediawiki 1.37.2 with MariaDB at the new VM and
> copied images directory tree and converted LocalSettings.php to make it
> workable but when I restored mysql DB into mariaDB with "mysql -u root
> -p toshiwiki(my DB name) < toshiwikibackup.sql", I got "Database error"
> at the main page with the detail below:
>
> [a50bfc1261fc29c06a343aec] 2022-04-08 05:32:47: Fatal exception of type
> "Wikimedia\Rdbms\DBQueryError"

Related, we have a lot of luck using mysqldump to backup our wiki
database. I have tested the restores and they are Ok.
https://github.com/weidai11/website/blob/master/systemd/bitvise-backup#L80
and https://stackoverflow.com/q/105776.

I have not tested a MySQL backup followed by a MariaDB restore.

You might try it and see if it works for you.

Jeff
_______________________________________________
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org
To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
Re: upbrade database mysql 5.5.62 -> MariaDB 10.3.34 [ In reply to ]
On 4/8/22 00:51, Andre Klapper wrote:
> [a50bfc1261fc29c06a343aec] 2022-04-08 05:32:47: Fatal exception of type
>> "Wikimedia\Rdbms\DBQueryError"
>>
>> Can someone tell me where to start debugging
> See https://www.mediawiki.org/wiki/Manual:How_to_debug
>
> Cheers,
> andre

Thanks,

I didn't know "debug" manual page existed. I'll check it through.


Toshi

--
Toshi Esumi
web: http://www.toshiesumi.com
blog: http://toshiesumi.blogspot.com
_______________________________________________
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org
To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
Re: upbrade database mysql 5.5.62 -> MariaDB 10.3.34 [ In reply to ]
On 4/8/22 04:45, Jeffrey Walton wrote:
> On Fri, Apr 8, 2022 at 1:47 AM Toshi Esumi <email2@toshiesumi.com> wrote:
>> I'm trying to upgrade/migrate my mediawiki from my old Ubuntu VM 14.04
>> to a new Ubuntu VM 20.04. The detail of the components are below. I
>> managed to set up a new mediawiki 1.37.2 with MariaDB at the new VM and
>> copied images directory tree and converted LocalSettings.php to make it
>> workable but when I restored mysql DB into mariaDB with "mysql -u root
>> -p toshiwiki(my DB name) < toshiwikibackup.sql", I got "Database error"
>> at the main page with the detail below:
>>
>> [a50bfc1261fc29c06a343aec] 2022-04-08 05:32:47: Fatal exception of type
>> "Wikimedia\Rdbms\DBQueryError"
> Related, we have a lot of luck using mysqldump to backup our wiki
> database. I have tested the restores and they are Ok.
> https://github.com/weidai11/website/blob/master/systemd/bitvise-backup#L80
> and https://stackoverflow.com/q/105776.
>
> I have not tested a MySQL backup followed by a MariaDB restore.
>
> You might try it and see if it works for you.
>
> Jeff

Ok, thank you for additional tips.

Toshi

--
Toshi Esumi
web: http://www.toshiesumi.com
blog: http://toshiesumi.blogspot.com
_______________________________________________
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org
To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
Re: upbrade database mysql 5.5.62 -> MariaDB 10.3.34 [ In reply to ]
On 4/8/22 16:55, Toshi Esumi wrote:
>
> On 4/8/22 00:51, Andre Klapper wrote:
>> [a50bfc1261fc29c06a343aec] 2022-04-08 05:32:47: Fatal exception of type
>>> "Wikimedia\Rdbms\DBQueryError"
>>>
>>> Can someone tell me where to start debugging
>> See https://www.mediawiki.org/wiki/Manual:How_to_debug
>>
>> Cheers,
>> andre
>
> Thanks,
>
> I didn't know "debug" manual page existed. I'll check it through.
>
>
> Toshi
>
When I set up a debug log file as in the manual, I got below Error and
raised an exception. What does this actually mean? The table 'ipblocks'
seems to be empty even at current working wiki.

[exception] [f65061fd070ba64e5c3ded34] /toshiwiki/Main_Page
  Wikimedia\Rdbms\DBQueryError: Error 1054: Unknown column
'ipb_sitewide' in 'field list' (localhost) Function:
MediaWiki\Block\DatabaseBlock::newLoad Query: SELECT
 ipb_id,ipb_address,ipb_timestamp,ipb_auto,ipb_anon_only,ipb_create_account,ipb_enable_autoblock,ipb_expiry,ipb_deleted,ipb_block_email,ipb_allow_usertalk,ipb_parent_block_id,ipb_sitewide,ipb_by_actor,ipblocks_a ctor.actor_user AS `ipb_by`,ipblocks_actor.actor_name AS `ipb_by_text`,comment_ipb_reason.comment_text AS `ipb_reason_text`,comment_ipb_reason.comment_data AS `ipb_reason_data`,comment_ipb_reason.comment_id AS `ipb_reason_cid `  FROM `ipblocks` JOIN `actor` `ipblocks_actor` ON ((actor_id=ipb_by_actor)) JOIN `comment` `comment_ipb_reason` ON ((comment_ipb_reason.comment_id = ipb_reason_id))   WHERE ipb_address = '/my_vm's_host_IP/' OR ((ipb_range_sta rt  LIKE 'CF6C%' ESCAPE '`' ) AND (ipb_range_start <= 'CF6CDAAA') AND (ipb_range_end >= 'CF6CDAAA')) Toshi

--
Toshi Esumi
web:http://www.toshiesumi.com
blog:http://toshiesumi.blogspot.com
Re: upbrade database mysql 5.5.62 -> MariaDB 10.3.34 [ In reply to ]
Did you run the database update script after restoring the database? I
don't have the full history this thread in front of me, but I believe you
said you also updated Mediawiki at the same time as migrating your database.

https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script

Jeffrey T. Darlington
General Protection Fault, The Comic Strip
https://www.gpf-comics.com/

On Sun, Apr 10, 2022 at 12:40 AM Toshi Esumi <email2@toshiesumi.com> wrote:

>
> On 4/8/22 16:55, Toshi Esumi wrote:
>
>
> On 4/8/22 00:51, Andre Klapper wrote:
>
> [a50bfc1261fc29c06a343aec] 2022-04-08 05:32:47: Fatal exception of type
>
> "Wikimedia\Rdbms\DBQueryError"
>
> Can someone tell me where to start debugging
>
> See https://www.mediawiki.org/wiki/Manual:How_to_debug
>
> Cheers,
> andre
>
>
> Thanks,
>
> I didn't know "debug" manual page existed. I'll check it through.
>
>
> Toshi
>
> When I set up a debug log file as in the manual, I got below Error and
> raised an exception. What does this actually mean? The table 'ipblocks'
> seems to be empty even at current working wiki.
>
> [exception] [f65061fd070ba64e5c3ded34] /toshiwiki/Main_Page Wikimedia\Rdbms\DBQueryError: Error 1054: Unknown column 'ipb_sitewide' in 'field list' (localhost)
> Function: MediaWiki\Block\DatabaseBlock::newLoad
>
> Query: SELECT ipb_id,ipb_address,ipb_timestamp,ipb_auto,ipb_anon_only,ipb_create_account,ipb_enable_autoblock,ipb_expiry,ipb_deleted,ipb_block_email,ipb_allow_usertalk,ipb_parent_block_id,ipb_sitewide,ipb_by_actor,ipblocks_a
> ctor.actor_user AS `ipb_by`,ipblocks_actor.actor_name AS `ipb_by_text`,comment_ipb_reason.comment_text AS `ipb_reason_text`,comment_ipb_reason.comment_data AS `ipb_reason_data`,comment_ipb_reason.comment_id AS `ipb_reason_cid
> ` FROM `ipblocks` JOIN `actor` `ipblocks_actor` ON ((actor_id=ipb_by_actor)) JOIN `comment` `comment_ipb_reason` ON ((comment_ipb_reason.comment_id = ipb_reason_id)) WHERE ipb_address = '*my_vm's_host_IP*' OR ((ipb_range_sta
> rt LIKE 'CF6C%' ESCAPE '`' ) AND (ipb_range_start <= 'CF6CDAAA') AND (ipb_range_end >= 'CF6CDAAA'))
>
>
>
> Toshi
>
> --
> Toshi Esumi
> web: http://www.toshiesumi.com
> blog: http://toshiesumi.blogspot.com
>
> _______________________________________________
> MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org
> To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
>
> https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
Re: upbrade database mysql 5.5.62 -> MariaDB 10.3.34 [ In reply to ]
On 4/10/22 05:44, Jeffrey T. Darlington wrote:
> Did you run the database update script after restoring the database? 
> I don't have the full history this thread in front of me, but I
> believe you said you also updated Mediawiki at the same time as
> migrating your database.
>
> https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
>
> Jeffrey T. Darlington
>
That was it!

I was coming through the upgrading manual and reached adapting
LocalSettings file, then got apache2 working with my path when I saw
this error. The next section was this "Run the update script". As I put
in the subject I was blindly believing it was a database conversion
problem and never thought about the new php environment was causing this
database error.

I've learned something new today.

Thank you for your help.


Toshi

--
Toshi Esumi
web: http://www.toshiesumi.com
blog: http://toshiesumi.blogspot.com
_______________________________________________
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org
To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/