Announcement

#1 2021-10-25 16:24:47

Anrey_S
Member
2021-10-25
2

mysql error 1017 Can't find file: piwigo_user_cache.MYI

Hello/Hi/Greetings,

My piwigo gallery was working fine for 2 months and now i see this error. Please tell me how to restore the gallery and what causes this error

Code:

Warning:  [mysql error 1017] Can't find file: './piwigo/piwigo_user_cache.MYI' (errno: 2 "No such file or directory")

SELECT
    ui.*,
    uc.*,
    t.name AS theme_name
  FROM piwigo_user_infos AS ui
    LEFT JOIN piwigo_user_cache AS uc ON ui.user_id = uc.user_id
    LEFT JOIN piwigo_themes AS t ON t.id = ui.theme
  WHERE ui.user_id = 2
; in /var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php on line 864


Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool in 
/var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php:228 Stack trace: #0 
/var/www/html/piwigo/include/functions_user.inc.php(379): pwg_db_fetch_assoc() #1 
/var/www/html/piwigo/include/functions_user.inc.php(293): getuserdata() #2 
/var/www/html/piwigo/include/user.inc.php(60): build_user() #3 
/var/www/html/piwigo/include/common.inc.php(154): include('/var/www/html/p...') #4 
/var/www/html/piwigo/index.php(11): include_once('/var/www/html/p...') #5 {main} thrown in 
/var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php on line 228

Piwigo -latest
Ubuntu server 20.04
PHP-FPM 7.4
NginX -latest
MariaDB -latest

Offline

 

#2 2021-10-26 01:07:51

erAck
Only trying to help
2015-09-06
2027

Re: mysql error 1017 Can't find file: piwigo_user_cache.MYI

Looks like a broken database connection or the database lacking tables, piwigo_user_cache should be a database table, but if mysql is looking for a file piwigo_user_cache.MYI instead ...


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2021-10-26 12:21:03

Anrey_S
Member
2021-10-25
2

Re: mysql error 1017 Can't find file: piwigo_user_cache.MYI

Thx for the answer!

I fixed up the gallery via "mysql> source" but I would like to understand what causes this error. Maybe I should stop using mariadb, or ...

Offline

 

#4 2022-11-03 05:10:06

itmen
Member
2022-10-24
5

Re: mysql error 1017 Can't find file: piwigo_user_cache.MYI

Anrey_S wrote:

Thx for the answer!

I fixed up the gallery via "mysql> source" but I would like to understand what causes this error. Maybe I should stop using mariadb, or ...

Hy Dude can you explain more detail what you do for fix that?. from two weeks ago i have same problem. thanks

Offline

 

#5 2024-04-10 03:10:06

tgurske
Member
2023-04-08
2

Re: mysql error 1017 Can't find file: piwigo_user_cache.MYI

The actual mariadb/mysql database file is missing for that table. It's a database issue.

For me, "mysqlcheck database_name" showed:

gallery.activity                                   OK
gallery.caddie                                     OK
gallery.categories                                 OK
gallery.comments                                   OK
gallery.config                                     OK
gallery.favorites                                  OK
gallery.group_access                               OK
gallery.groups                                     OK
gallery.history                                    OK
gallery.history_summary                            OK
gallery.image_category                             OK
gallery.image_format                               OK
gallery.image_tag                                  OK
gallery.images                                     OK
gallery.languages                                  OK
gallery.lounge                                     OK
gallery.old_permalinks                             OK
gallery.plugins                                    OK
gallery.rate                                       OK
gallery.search                                     OK
gallery.sessions                                   OK
gallery.sites                                      OK
gallery.tags                                       OK
gallery.themes                                     OK
gallery.upgrade                                    OK
gallery.user_access                                OK
gallery.user_auth_keys                             OK
gallery.user_cache
Error    : Can't find file: './gallery/user_cache.MYI' (errno: 2 "No such file or directory")
status   : Operation failed
gallery.user_cache_categories
Error    : Can't find file: './gallery/user_cache_categories.MYI' (errno: 2 "No such file or directory")
status   : Operation failed
gallery.user_feed                                  OK
gallery.user_group                                 OK
gallery.user_infos                                 OK
gallery.user_mail_notification                     OK
gallery.users                                      OK

So I just deleted the two cache tables that were giving errors and then recreated them using the SQL code in the /install/piwigo_structure-mysql.sql file. That fixed it.

There are commands to try to repair the tables but if they are gone you have to either restore them from backup or recreate those tables.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact