Results 1 to 4 of 4

Thread: Mariadb fails to start were it did earlier

  1. #1
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,601

    Default Mariadb fails to start were it did earlier

    I have a few small databases running MySQL/Mariadb.

    I am trying to convert from mysql to mysqli in PHP. after an earlier trial a few months ago, I suddenly find out that the mariadb server is not running (and that makes the testing not easier ).

    Starting it through YaST > Services Manager does fail. The CLI:
    Code:
    nieuw:~ # systemctl start mariadb
    Job for mariadb.service failed because the control process exited with error code.
    See "systemctl  status mariadb.service" and "journalctl  -xe" for details.
    nieuw:~ # systemctl  status mariadb.service
    ● mariadb.service - MySQL server
       Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
       Active: failed (Result: exit-code) since Wed 2018-12-26 17:21:44 CET; 7s ago
      Process: 8483 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper upgrade (code=exited, status=1/FAILURE)
      Process: 8475 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper install (code=exited, status=0/SUCCESS)
    
    Dec 26 17:21:44 nieuw mysql-systemd-helper[8483]: /usr/bin/mysqlcheck: Got error: 1102: Incorrect database name '#mysql50#.vim' when selecting the database
    Dec 26 17:21:44 nieuw mysql-systemd-helper[8483]: FATAL ERROR: Upgrade failed
    Dec 26 17:21:44 nieuw mysql-systemd-helper[8483]: Upgrade failed
    Dec 26 17:21:44 nieuw mysql-systemd-helper[8483]: Shuting down protected MySQL
    Dec 26 17:21:44 nieuw mysql-systemd-helper[8483]: Final cleanup
    Dec 26 17:21:44 nieuw mysql-systemd-helper[8483]: Something failed during upgrade, please check logs
    Dec 26 17:21:44 nieuw systemd[1]: mariadb.service: Control process exited, code=exited status=1
    Dec 26 17:21:44 nieuw systemd[1]: Failed to start MySQL server.
    Dec 26 17:21:44 nieuw systemd[1]: mariadb.service: Unit entered failed state.
    Dec 26 17:21:44 nieuw systemd[1]: mariadb.service: Failed with result 'exit-code'.
    nieuw:~ #
    I ahave no idea how to interprete this. Has the "Upgrade failed" anything to do with a system software update? And what is the meaning of a database called #mysql50#.vim, I haven't one with that name.

    Anyone that is has more insight in Mariadb and can help with suggestions is more then welcome.
    Henk van Velden

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,601

    Default Re: Mariadb fails to start were it did earlier

    This is an old one where apparently nobody had an idea.

    Today I tried again using YaST > Sevices Manager. It told me that the starting it errored. Somewhere in the listing it talked about something .viminfo. Sorry I can not recall that message to show it here.
    I then went to the home directory of the mysql user. The were a .vim directory and a .viminfo file. Further investigation showed there was no explanation in the vim man page, but there was on the Internet. It seems that vim keeps there information to be used at a restart of vim. Seemed not as life threatening to delete it, which I did.

    Now starting mariadb from YaST > Services Manager did meet success:
    Code:
      ● mariadb.service - MySQL server    Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)    Active: active (running) since Fri 2019-01-11 12:54:03 CET; 42s ago   Process: 6436 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper upgrade (code=exited, status=0/SUCCESS)   Process: 6428 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper install (code=exited, status=0/SUCCESS)  Main PID: 6528 (mysqld)    Status: "Taking your SQL requests now..."     Tasks: 30 (limit: 4915)    CGroup: /system.slice/mariadb.service            └─6528 /usr/sbin/mysqld --defaults-file=/etc/my.cnf --user=mysql 
    Jan 11 12:54:02 nieuw mysql-systemd-helper[6436]: spoorwegen Jan 11 12:54:02 nieuw mysql-systemd-helper[6436]: spoorwegen.boek                                    OK Jan 11 12:54:02 nieuw mysql-systemd-helper[6436]: test Jan 11 12:54:02 nieuw mysql-systemd-helper[6436]: Phase 7/7: Running 'FLUSH PRIVILEGES' Jan 11 12:54:03 nieuw mysql-systemd-helper[6436]: OK Jan 11 12:54:03 nieuw mysql-systemd-helper[6436]: Everything upgraded successfully Jan 11 12:54:03 nieuw mysql-systemd-helper[6436]: Shuting down protected MySQL Jan 11 12:54:03 nieuw mysql-systemd-helper[6436]: Final cleanup Jan 11 12:54:03 nieuw mysql-systemd-helper[6528]: 2019-01-11 12:54:03 140220406593728 [Note] /usr/sbin/mysqld (mysqld 10.2.15-MariaDB) starting as process 6528 ... Jan 11 12:54:03 nieuw systemd[1]: Started MySQL server.
    No new .vim* things were created in mysql's home directory, but I hope you can understand that I am realy wondering what the internal vim files have to do with the starting of mariadb. Suggestions are welcome!

    Edit: I applogize for the bad CODE, do not know why this went wrong.
    Last edited by hcvv; 11-Jan-2019 at 05:09.
    Henk van Velden

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,627
    Blog Entries
    1

    Default Re: Mariadb fails to start were it did earlier

    Based on a little Internet search, vim ships with some plugins which enhance command line management of various databases including mysql/mariadb.

    Looks like somehow a string was improperly made into a database name.
    I assume you're in the process of changing your database driver from the old PHP connector to the MySQLi connector? That's probably the "upgrade"

    Lots of speculation here...

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,601

    Default Re: Mariadb fails to start were it did earlier

    Thanks for the additional remarks
    I indeed was converting from mysql_... to mysqli_... commands.
    The openSUSE installation was originaly done with 42.2 and upgraded using "repo switching" to 42.3 and then 15.0. But mariadb was only started recently when already on 15.0.

    The goal is to convert a web site still running on 31.1 to 15.0

    Apache was converted first with a small change in the configs.

    PHP5 to PHP7 was also a flawless coneversion basically.

    The mysql database was exported on 13.1 and mariadb was started and configured with success on 15.0. My import script needed some addaption to the newest mariadb, but then importing was succesfully done and access from the CLI was as expected Thus mariadb was running then (also on boot)..

    Last brick to add to get full functionality was the conevrsion to new mysqli interface. Using info found on the internet I converted the calls, but no luck. Debugging was not to easy because of lack of day to day experience on my side. I laid it aside for some time and then started again. After half a day of trying (putting echo statements in the PHP script to see were things went), I found out that mariadb did not even run!. And I could not get it running (see my first post above).

    I still do not understand why that was the moment that vi (of all programs) was used by mariadb as a pretext.

    I guess we never will realy know what was wrong, but it proves that adding "niceties" to a program may introduce new sources of havoc when something goes wrong.

    I can also add that in the mean time (mariadb running!) I found how to adapt to mysqli all I use of it and the whole stack (mariadb, PHP7, Apache) works as expected.

    Again thanks for looking into it and revealing a link between vi and mariadb.
    Last edited by hcvv; 12-Jan-2019 at 06:58.
    Henk van Velden

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •