• Like 0

    MariaDB database server


    Hi everyone!
    I have a little problem with mysql server. Http is working fine, mysql doesn’t. :(
    Any advice?

    When I install

    sudo Pacman -S mysql
    

    then I’ll try to start mysql

    sudo systemctl start mysqld
    

    I’ve got this

    Job for mariadb.service failed because the control process exited with error code.
    See "systemctl status mariadb.service" and "journalctl -xe" for details.
    
    
    [[email protected] ~]$ sudo systemctl status mysqld
    ● mariadb.service - MariaDB database server
       Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
       Active: failed (Result: exit-code) since Fri 2017-02-10 14:02:37 CET; 2s ago
      Process: 4804 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
      Process: 4750 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$
      Process: 4747 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
     Main PID: 4804 (code=exited, status=1/FAILURE)
       Status: "MariaDB server is down"
    
    úno 10 14:02:36 thegxero-pc mysqld[4804]: 2017-02-10 14:02:36 140600134467072 [ERROR] Plugin 'InnoDB' init function returned error.
    úno 10 14:02:36 thegxero-pc mysqld[4804]: 2017-02-10 14:02:36 140600134467072 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    úno 10 14:02:36 thegxero-pc mysqld[4804]: 2017-02-10 14:02:36 140600134467072 [Note] Plugin 'FEEDBACK' is disabled.
    úno 10 14:02:36 thegxero-pc mysqld[4804]: 2017-02-10 14:02:36 140600134467072 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
    úno 10 14:02:36 thegxero-pc mysqld[4804]: 2017-02-10 14:02:36 140600134467072 [ERROR] Unknown/unsupported storage engine: InnoDB
    úno 10 14:02:36 thegxero-pc mysqld[4804]: 2017-02-10 14:02:36 140600134467072 [ERROR] Aborting
    úno 10 14:02:37 thegxero-pc systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
    úno 10 14:02:37 thegxero-pc systemd[1]: Failed to start MariaDB database server.
    úno 10 14:02:37 thegxero-pc systemd[1]: mariadb.service: Unit entered failed state.
    úno 10 14:02:37 thegxero-pc systemd[1]: mariadb.service: Failed with result 'exit-code'.
    
    
  • Like 0

    Install mariadb, afterwards run the following command before starting the mariadb.service:

    mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
    

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    http://kamprad.net/howto-installing-antergos/
    https://forum.antergos.com/topic/1883/how-to-include-system-logs-when-asking-for-help

  • Like 0

    Doesn’t work :(

    [[email protected] ~]$ sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
    WARNING: The host 'thegxero-pc' could not be looked up with resolveip.
    This probably means that your libc libraries are not 100 % compatible
    with this binary MariaDB version. The MariaDB daemon, mysqld, should work
    normally with the exception that host name resolving will not work.
    This means that you should use IP addresses instead of hostnames
    when specifying MariaDB privileges !
    Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
    2017-02-10 19:52:24 140458839866880 [Note] /usr/sbin/mysqld (mysqld 10.1.21-MariaDB) starting as process 13933 ...
    2017-02-10 19:52:24 140458839866880 [Note] InnoDB: Using mutexes to ref count buffer pool pages
    2017-02-10 19:52:24 140458839866880 [Note] InnoDB: The InnoDB memory heap is disabled
    2017-02-10 19:52:24 140458839866880 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2017-02-10 19:52:24 140458839866880 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    2017-02-10 19:52:24 140458839866880 [Note] InnoDB: Compressed tables use zlib 1.2.11
    2017-02-10 19:52:24 140458839866880 [Note] InnoDB: Using Linux native AIO
    2017-02-10 19:52:24 140458839866880 [Note] InnoDB: Using generic crc32 instructions
    2017-02-10 19:52:24 140458839866880 [Note] InnoDB: Initializing buffer pool, size = 128.0M
    2017-02-10 19:52:24 140458839866880 [Note] InnoDB: Completed initialization of buffer pool
    2017-02-10 19:52:24 140458839866880 [ERROR] InnoDB: Only one log file found.
    2017-02-10 19:52:24 140458839866880 [ERROR] Plugin 'InnoDB' init function returned error.
    2017-02-10 19:52:24 140458839866880 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    2017-02-10 19:52:24 140458839866880 [ERROR] Unknown/unsupported storage engine: InnoDB
    2017-02-10 19:52:24 140458839866880 [ERROR] Aborting
    
    
    Installation of system tables failed!  Examine the logs in
    /var/lib/mysql for more information.
    
    The problem could be conflicting information in an external
    my.cnf files. You can ignore these by doing:
    
        shell> /usr/scripts/scripts/mysql_install_db --defaults-file=~/.my.cnf
    
    You can also try to start the mysqld daemon with:
    
        shell> /usr/sbin/mysqld --skip-grant --general-log &
    
    and use the command line tool /usr/bin/mysql
    to connect to the mysql database and look at the grant tables:
    
        shell> /usr/bin/mysql -u root mysql
        mysql> show tables;
    
    Try 'mysqld --help' if you have problems with paths.  Using
    --general-log gives you a log in /var/lib/mysql that may be helpful.
    
    The latest information about mysql_install_db is available at
    https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
    MariaDB is hosted on launchpad; You can find the latest source and
    email lists at http://launchpad.net/maria
    
    Please check all of the above before submitting a bug report
    at http://mariadb.org/jira
    
    
  • Like 0

    do you read the wiki entry already?

    https://wiki.archlinux.org/index.php/MySQL

    2017-02-10 19:52:24 140458839866880 [ERROR] Plugin 'InnoDB' init function returned error.
    2017-02-10 19:52:24 140458839866880 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    2017-02-10 19:52:24 140458839866880 [ERROR] Unknown/unsupported storage engine: InnoDB
    

    this is what wents wrong…
    So check the mysql log files…

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    http://kamprad.net/howto-installing-antergos/
    https://forum.antergos.com/topic/1883/how-to-include-system-logs-when-asking-for-help

  • Like 0

    No I didn’t read. Ok Plugin InnoDB returned error but on wiki I can search the answer :(
    I use net tutorial. Where I can find these log files? In /var/lib/mysql/

    aria_log_control   client-key.pem   mysql-bin.000001  mysql-bin.000006  mysql-bin.000011  test
    aria_log.00000001  ibdata1          mysql-bin.000002  mysql-bin.000007  private_key.pem
    ca-key.pem         ib_logfile0_old  mysql-bin.000003  mysql-bin.000008  public_key.pem
    ca.pem             mysql            mysql-bin.000004  mysql-bin.000009  server-cert.pem
    client-cert.pem    mysql-bin.index  mysql-bin.000005  mysql-bin.000010  server-key.pem
    
    
  • Like 0
    /var/log/mysql
    

    but i am not shure caus of systemd

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    http://kamprad.net/howto-installing-antergos/
    https://forum.antergos.com/topic/1883/how-to-include-system-logs-when-asking-for-help

  • Like 0

    nope,
    directory or file doesn’t exists.

  • Like 0

    Logging

    systemd has its own logging system called the systemd journal. Logs that might have been found before in the default error log file or in syslog may instead be logged by systemd.

    To read all the MariaDB server logs, use the following command:

    journalctl -u mariadb
    

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    http://kamprad.net/howto-installing-antergos/
    https://forum.antergos.com/topic/1883/how-to-include-system-logs-when-asking-for-help

  • Like 0

    Ok

    úno 09 21:39:04 thegxero-pc systemd[1]: Starting MariaDB database server...
    úno 09 21:39:04 thegxero-pc mysqld[3196]: 2017-02-09 21:39:04 140131273920000 [Note] /usr/sbin/mysqld (mysqld 10.1.21-MariaDB) starting as process 3196 ...
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: Using mutexes to ref count buffer pool pages
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: The InnoDB memory heap is disabled
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: Compressed tables use zlib 1.2.11
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: Using Linux native AIO
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: Using generic crc32 instructions
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: Initializing buffer pool, size = 128.0M
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: Completed initialization of buffer pool
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: Database physically writes the file full: wait...
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Warning] InnoDB: New log files created, LSN=45883
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: Doublewrite buffer not found: creating new
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: Doublewrite buffer created
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Note] InnoDB: 128 rollback segment(s) are active.
    úno 09 21:39:05 thegxero-pc mysqld[3196]: 2017-02-09 21:39:05 140131273920000 [Warning] InnoDB: Creating foreign key constraint system tables.
    
    
  • Like 0

    plz use http://pastebin.com/ for logs and post the url

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    http://kamprad.net/howto-installing-antergos/
    https://forum.antergos.com/topic/1883/how-to-include-system-logs-when-asking-for-help

  • Like 0

    Ok, I apologize.
    So, I reainstall Arch OS, then install mysql again and now everything works fine!
    Thank you for your time!

database6 mariadb2 Posts 11Views 418
Log in to reply