You are not logged in.

#1 2018-02-12 20:02:16

isrgannr
Member
Registered: 2018-02-12
Posts: 1

Mysql Doesn't Work

Hi All;

I'm using Arch Linux but I have a problem. Mysql doesn't work..

Firstly; I install MariaDB

Secondly; I run this command -> "sudo mysql_install_db --user=mysql --basedir=/usr --datedir=/var/lib/mysql"
The command's output:

Installing MariaDB/MySQL system tables in './data' ...
2018-02-12 19:42:02 140527237042112 [Note] /usr/bin/mysqld (mysqld 10.1.31-MariaDB) starting as process 28705 ...
2018-02-12 19:42:02 140527237042112 [ERROR] mysqld: Can't create/write to file '/home/isrgannr/Downloads/data/aria_log_control' (Errcode: 13 "Permission denied")
2018-02-12 19:42:02 140527237042112 [ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '/home/isrgannr/Downloads/data/aria_log_control'
2018-02-12 19:42:02 140527237042112 [ERROR] Plugin 'Aria' init function returned error.
2018-02-12 19:42:02 140527237042112 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2018-02-12 19:42:02 140527237042112 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.

2018-02-12 19:42:02 140527237042112 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2018-02-12 19:42:02 140527237042112 [Note] InnoDB: The InnoDB memory heap is disabled
2018-02-12 19:42:02 140527237042112 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-02-12 19:42:02 140527237042112 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-02-12 19:42:02 140527237042112 [Note] InnoDB: Compressed tables use zlib 1.2.11
2018-02-12 19:42:02 140527237042112 [Note] InnoDB: Using Linux native AIO
2018-02-12 19:42:02 140527237042112 [Note] InnoDB: Using generic crc32 instructions
2018-02-12 19:42:02 140527237042112 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2018-02-12 19:42:02 140527237042112 [Note] InnoDB: Completed initialization of buffer pool
2018-02-12 19:42:02 140527237042112 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2018-02-12 19:42:02 140527237042112 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2018-02-12 19:42:02 140527237042112 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2018-02-12 19:42:03 140527237042112 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2018-02-12 19:42:03 140527237042112 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2018-02-12 19:42:03 140527237042112 [Warning] InnoDB: New log files created, LSN=45781
2018-02-12 19:42:03 140527237042112 [Note] InnoDB: Doublewrite buffer not found: creating new
2018-02-12 19:42:03 140527237042112 [Note] InnoDB: Doublewrite buffer created
2018-02-12 19:42:03 140527237042112 [Note] InnoDB: 128 rollback segment(s) are active.
2018-02-12 19:42:03 140527237042112 [Warning] InnoDB: Creating foreign key constraint system tables.
2018-02-12 19:42:04 140527237042112 [Note] InnoDB: Foreign key constraint system tables created
2018-02-12 19:42:04 140527237042112 [Note] InnoDB: Creating tablespace and datafile system tables.
2018-02-12 19:42:04 140527237042112 [Note] InnoDB: Tablespace and datafile system tables created.
2018-02-12 19:42:04 140527237042112 [Note] InnoDB: Waiting for purge to start
2018-02-12 19:42:04 140527237042112 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-83.0 started; log sequence number 0
2018-02-12 19:42:04 140526754895616 [Note] InnoDB: Dumping buffer pool(s) not yet started
2018-02-12 19:42:04 140527237042112 [ERROR] /usr/bin/mysqld: unknown variable 'datedir=/var/lib/mysql'
2018-02-12 19:42:04 140527237042112 [ERROR] Aborting


Installation of system tables failed!  Examine the logs in
./data for more information.

The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:

    shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf

You can also try to start the mysqld daemon with:

    shell> /usr/bin/mysqld --skip-grant-tables --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 ./data 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
You can find the latest source at https://downloads.mariadb.org and
the maria-discuss email list at https://launchpad.net/~maria-discuss

Please check all of the above before submitting a bug report
at http://mariadb.org/jira

The interesting line in this output:

2018-02-12 19:42:04 140527237042112 [ERROR] /usr/bin/mysqld: unknown variable 'datedir=/var/lib/mysql'
2018-02-12 19:42:04 140527237042112 [ERROR] Aborting

After the run this command -> sudo systemctl start mysqld

And this status service:

● mariadb.service - MariaDB 10.1.31 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2018-02-12 19:42:11 UTC; 8s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 28788 ExecStart=/usr/bin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 28736 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]
  Process: 28735 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 28788 (code=exited, status=1/FAILURE)

Feb 12 19:42:11 NxR mysqld[28788]: 2018-02-12 19:42:11 140123172429760 [Note] Recovering after a crash using mysql-bin
Feb 12 19:42:11 NxR mysqld[28788]: 2018-02-12 19:42:11 140123172429760 [Note] Starting crash recovery...
Feb 12 19:42:11 NxR mysqld[28788]: 2018-02-12 19:42:11 140123172429760 [Note] Crash recovery finished.
Feb 12 19:42:11 NxR mysqld[28788]: 2018-02-12 19:42:11 140123172346624 [Warning] Failed to load slave replication state from table m
Feb 12 19:42:11 NxR mysqld[28788]: 2018-02-12 19:42:11 140123172429760 [ERROR] Can't open and lock privilege tables: Table 'mysql.se
Feb 12 19:42:11 NxR mysqld[28788]: 2018-02-12 19:42:11 140123172429760 [Note] Server socket created on IP: '::'.
Feb 12 19:42:11 NxR mysqld[28788]: 2018-02-12 19:42:11 140123172429760 [ERROR] Fatal error: Can't open and lock privilege tables: Ta
Feb 12 19:42:11 NxR systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Feb 12 19:42:11 NxR systemd[1]: mariadb.service: Failed with result 'exit-code'.
Feb 12 19:42:11 NxR systemd[1]: Failed to start MariaDB 10.1.31 database server.

Please Help Me sad(

Offline

#2 2018-02-12 20:07:38

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Mysql Doesn't Work

1. Please edit your thread title and change it to one that actually describes your issue: https://wiki.archlinux.org/index.php/Co … ow_to_post

2. Your systemctl output is truncated: post the full output so the error messages are complete.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-02-12 20:26:46

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: Mysql Doesn't Work

transcription error

--datedir
--datadir

So then

Installing MariaDB/MySQL system tables in './data' ...

When you encounter a failure ignoring it and continuing is not recommended.

Offline

Board footer

Powered by FluxBB