MariaDB 10.1.38 failed to start


  • | 2354 points

    Hi @leokhoa

    I'm using
    Laragon Lite 4.0.14 190508

    my set up on local development is to match with the legacy system which is using mariadb-10.1.38, windows 10 64 bit

    so, I'm using mariadb-10.1.38 and start it up normally the first time.
    the issue is happening if I stop and start again the db

    Error: Service MariaDB can not start.

    BUT, I found the hack to this.
    If I change db root password, it will make the app not responding, then I need to force close the app.

    the next time I start the DB, its working normally.

    this is the error log on mysqld.log
    2020-02-13 12:00:03 20308 [ERROR] mysqld: Incorrect key file for table '.\mysql\user'; try to repair it
    2020-02-13 12:00:03 20308 [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect key file for table '.\mysql\user'; try to repair it

    My suspect so far

    1. there might be some issue on db start or stop process.
    2. user permission on .\mysql\user.*
      -rw-r--r-- 1 mdennisa 197121 600 Nov 22 12:09 user.MYD
      -rw-r--r-- 1 mdennisa 197121 4.0K Jan 23 15:28 user.MYI
      -rw-r--r-- 1 mdennisa 197121 3.2K Feb 4 2019 user.frm

    Please kindly check, or advise if somehow I can fix it locally on my end.


  • administrators
    | 122449 points

    @mdennisa : You can use MariaDB 10.4 with no password to avoid the issue.
    Ref: https://forum.laragon.org/topic/1878/mariadb-version-10-4-user-logon-issue


  • | 2354 points

    @leokhoa
    Thanks for your reply,
    unfortunately, I have to use mariadb-10.1.38 due to legacy data restrictions

    I had accidentally resolved this issue on lesser version of Laragon in my local.
    but I was using another PC.

    the only thing I remember was switching mariadb 64 bit to mariadb 32 bit for the same version.

    I will check again and share the findings.


  • | 2354 points

    @leokhoa

    I managed to get the other set up that works fine with mariadb-10.1.38

    I was using Laragon Full 3.3.3 180731
    But in the Preferences the Data Dir is quite different, as per below
    C:\laragon\data\mysql\mariadb

    This version still can use mariadb-10.1.38 without problem.

    I will try again with this version on portable mode as per this link
    https://github.com/leokhoa/laragon/releases/tag/3.3

    I will share the findings again :)


  • | 2354 points

    I confirmed that I can still use mariadb-10.1.38 on

    Laragon Mint 3.3.3 180731

    without having error on every start DB.
    not a very convenient setup, but at least helping a bit on working for legacy project rather than to change root pass and force close every time.

    my current solution is to have the above as portable to start mariadb
    then connect the app to mariadb which is using same host & port

    My test is limited with empty DB, just testing the connection, start & stop DB.
    I will test further to add mysql user and some data into DB.

    I understand that this might not worth the fix, but if anything I can help on checking or giving more information, I hope it would benefit all laragon users.

    happy laragon-ing! cheers! :)


  • | 2354 points

    Hi @leokhoa

    I extended my test further.
    the latest suspect that I found out was the data dir naming convention

    I noticed the difference.

    Laragon 3.3.3
    --> will create data dir based on db type regardless the version
    ex: mariadb

    Laragon 4.0.14
    --> will create data dir based on db type including 2 level version number
    ex: mariadb-10.1

    So I purposely renamed the db folder inside bin by avoiding "dash" and "dot"
    mariadb-10.1.38-winx64 --> mariadb10_1_38

    by doing so, Laragon script will generate data dir as "mariadb" only without 2 level version number.
    I assume there is a regex function to handle the data dir creation.

    and WOW, the problem solved!!!

    Not sure what kind of sorcery was happening in the background, but I think we can assume that the data dir creation script is the real issue. And somehow, perhaps the DB shutdown was corrupting "user" file due to the data dir naming using dot or dash on Windows.

    I hope this finding can be used for future enhancement for all Laragon user who had similar issues like mine.

    and hoping that @leokhoa will fix it on the next release :)


  • administrators
    | 122449 points

    @mdennisa : What a nice catch!
    Please run that for a while. If there is any issue, I will update Laragon with your solution 😀


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.