DB crashed?


  • | 740 points

    After restart my PC i have problem with start my maria DB:

    Service MariaDB can not start. Reason:
    [date] 13400 [Note]
    PATH to mysqld
    {mysqld 10.2.12-MariaDB-log) starting as process 13752.
    ...

    And mariadb logs are full in logs like:
    018-02-06 21:52:24 13728 [Warning] Reading of some Master_info entries failed
    2018-02-06 21:52:24 13728 [ERROR] Failed to initialize multi master structures
    2018-02-06 21:52:24 13728 [ERROR] Aborting

    Btw. Thanks for Laragon, is awsome (i leave Docker).


  • | 740 points

    I deleted folder data so new DB was created but after Laragon Stop all and Start i have this problem again :/

    Phpmyadmin error:
    mysqli_real_connect(): MySQL server has gone away
    mysqli_real_connect(): Error while reading greeting packet. PID=9480
    mysqli_real_connect(): (HY000/2006): MySQL server has gone away

    Probably DB crashed because my php script was broken and did endless loop, but how to prevent crash DB every time in future? How restore my work?


  • administrators
    | 83853 points

    @Marek-Gralikowski :
    The error ERROR] Failed to initialize multi master structures is strange to me. Laragon is not configured to use multi-master in development environment.

    How about using MySQL: https://forum.laragon.org/topic/164/tutorial-how-to-add-another-mysql-version

    If your local data makes sense to you, you should backup it as it is a best practice.


  • | 740 points

    I would to use MariaDB, as i do it in production. Interesting for me is, why so easy i can crash entire database.

    Yea, backup could be nice but i was hoping there is an any automatic dump ;)


  • | 740 points

    Eh.. Again..

    I finished my work at night, normally closed computer, and i just turned on my pc and DB can not start. How can I check what is a reason of that? It's very annoying :(

    Can i just make new db and copy/paste data to restore my work?


  • administrators
    | 83853 points

    @Marek-Gralikowski : Strange!

    018-02-06 21:52:24 13728 [Warning] Reading of some Master_info entries failed
    2018-02-06 21:52:24 13728 [ERROR] Failed to initialize multi master structures
    2018-02-06 21:52:24 13728 [ERROR] Aborting
    

    I guess the root cause is from configuration. Replication failure caused the issue.
    How about:

    1. Rename your data dir to data.bak
    2. Dump your database from production
    3. Start Laragon to have new clean data and restore your database.

  • | 740 points

    I would to try restore my local database first.

    I install newest mariadb and force to create new data folder.
    Next i copied folder with database name from old mariadb folder to new, created.
    In phpmyadmin i see now all datatables but i can't enter them so i copied also mysql-bin.x files and after this many files like:
    MarekPC-relay-bin-2018@002d02@002d14@002012@003a18@003a07@002011752@0020@005bnote@005d@0020added@0020new@0020master_info@0020@0027@0027@0020to@0020hash@0020table@000d

    and

    master-2018@002d02@002d14@002012@003a18@003a07@002011752@0020@005bnote@005d@0020added@0020new@0020master_info@0020@0027@0027@0020to@0020hash@0020table@000d

    is created on run and problem is back.


  • administrators
    | 83853 points

    @Marek-Gralikowski : You should dump your databases to plain SQL, then restore from the SQL.


  • | 740 points

    How can i dump not starting/working/crushed DB?


  • administrators
    | 83853 points

    There is a strange issue on your current data so you should dump from your production.


  • | 740 points

    It is not problem with data only because it never happened on production or local Docker (i have used Laradock for several months). As i said, i would to prevent crash in future and it's my main purpose to writing here. Restoring data from production is easy but it is wasting time.


  • | 740 points

    Eh.. And again DB crashed without any reason. 10 days was ok.
    Yesterday i made normal Stop All, and today Maria DB doesn't want start.

    Any suggestion where to look for the cause?


  • administrators
    | 83853 points

    @Marek-Gralikowski : DB Crash for many reasons that why we need to have backups. However, do you aware that your DB crashes so often?
    -- and your error logs contains information related to replication.

    Did you follow my suggestion to go back to clean state, then dump & restore data?

    • If no, you can try that.
    • If yes, you should install MariaDB separately :)

  • | 740 points

    Of course, i was working on fresh and restored from production database by this 10 days (i make restore from sql file).
    What do you mean about installing separately?


  • | 740 points

    Here is full log:
    https://pastebin.com/t581k6mj
    2018-03-01 3:49:45 (typical programmer end work time :alien:)
    2018-03-01 13:16:45 and next is today when could not start


  • administrators
    | 83853 points

    It's terrible. I will check the incompatability with MariaDB when having time.
    I mean you uncheck MySQL package in Laragon (Preferences > Services and Ports) and download & install MariaDB.


  • administrators
    | 83853 points

    Btw, I still don't get this:

    2018-03-01 13:16:55 13848 [Note] Master '2018-03-01  3:49:45 14524 [Note] Reading of all Master_info entries succeded
    ': Slave I/O thread killed while connecting to master
    2018-03-01 13:16:55 13696 [Note] Reading Master_info: 'master-2018@002d03@002d01@0020@00203@003a49@003a45@002014524@0020@005bnote@005d@0020added@0020new@0020master_info@0020@0027@0027@0020to@0020hash@0020table@000d.info'  Relay_info:'relay-log-2018@002d03@002d01@0020@00203@003a49@003a45@002014524@0020@005bnote@005d@0020added@0020new@0020master_info@0020@0027@0027@0020to@0020hash@0020table@000d.info'
    2018-03-01 13:16:55 13848 [Note] Master '2018-03-01  3:49:45 14524 [Note] Reading of all Master_info entries succeded
    ': Slave I/O thread exiting, read up to log 'FIRST', position 4
    2018-03-01 13:16:55 13696 [Note] Initialized Master_info from 'master-2018@002d03@002d01@0020@00203@003a49@003a45@002014524@0020@005bnote@005d@0020added@0020new@0020master_info@0020@0027@0027@0020to@0020hash@0020table@000d.info'
    2018-03-01 13:16:55 13696 [Note] Added new Master_info '2018-03-01  3:49:45 14524 [Note] Added new Master_info '' to hash table
    ' to hash table
    2018-03-01 13:16:55 13856 [ERROR] Master '2018-03-01  3:49:45 14524 [Note] Added new Master_info '' to hash table
    ': Slave I/O: Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated. Internal MariaDB error code: 1593
    

    Please check your configuration, there is no Master/Slave setup in Laragon's default configuration for MySQL.


Log in to reply
 

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