invoiceninja / dockerfiles

Docker files for Invoice Ninja
https://hub.docker.com/r/invoiceninja/invoiceninja
GNU General Public License v2.0
418 stars 268 forks source link

"Plugin 'mysql_native_password' is not loaded" from Docker version v5.8.53 #577

Open jamesharding opened 6 months ago

jamesharding commented 6 months ago

Setup

Interface

Checklist

Describe the bug

Error when launching the container (see log below).

Steps To Reproduce

Occurs when launching the container. This has only started after updating to 5.8.53, it was working with issue for a year prior.

Logs

2024-05-08T13:06:35Z [INFO] [Entrypoint]: Initialising Invoice Ninja...
   INFO  Configuration cached successfully.  

   INFO  Caching the framework bootstrap files.  
  config ........................................................... 25ms DONE
  routes ........................................................... 70ms DONE

   INFO  Discovering packages.  
  imdhemy/laravel-purchases ............................................. DONE
  intervention/image .................................................... DONE
  invoiceninja/inspector ................................................ DONE
  laravel/slack-notification-channel .................................... DONE
  laravel/socialite ..................................................... DONE
  laravel/tinker ........................................................ DONE
  laravel/ui ............................................................ DONE
  livewire/livewire ..................................................... DONE
  nesbot/carbon ......................................................... DONE
  nunomaduro/termwind ................................................... DONE
  nwidart/laravel-modules ............................................... DONE
  sentry/sentry-laravel ................................................. DONE
  socialiteproviders/manager ............................................ DONE
  spatie/laravel-data ................................................... DONE
  spatie/php-structure-discoverer ....................................... DONE
  turbo124/beacon ....................................................... DONE
  webpatser/laravel-countries ........................................... DONE

In Connection.php line 829:
  SQLSTATE[HY000] [1524] Plugin 'mysql_native_password' is not loaded (Connec  
  tion: mysql, SQL: select table_name as `name`, (data_length + index_length)  
   as `size`, table_comment as `comment`, engine as `engine`, table_collation  
   as `collation` from information_schema.tables where table_schema = 'invoic  
  eninja' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED') order by table  
  _name)                                                                       

In Connector.php line 65:
  SQLSTATE[HY000] [1524] Plugin 'mysql_native_password' is not loaded  
jamesharding commented 6 months ago

This seems to be related to the 8.4 release of mysql, which has disabled and depreciated mysql_native_password.

This can be solved (for now) by launching the mysql database with the following command: mysqld --mysql-native-password=ON

jamesharding commented 6 months ago

Changelog reference for MySQL: https://dev.mysql.com/doc/relnotes/mysql/8.4/en/news-8-4-0.html#mysqld-8-4-0-deprecation-removal

sugarfunk commented 6 months ago

I added the below to the db portion of the docker compose. This works and everything starts now but still throwing "Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release."

command: --mysql-native-password=ON