[MDEV-11251] MariaDB installation failed at custom directory installation Created: 2016-11-08  Updated: 2016-12-08  Resolved: 2016-12-08

Status: Closed
Project: MariaDB Server
Component/s: Configuration
Affects Version/s: 10.1.18
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Muthuselvan I K Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Installation on CentOS 7



 Description   

Hi,

I got the installation failed and help me where I did the mistake.

1) login as mysql user
2) cd /opt
3) tar -zxvf /Downloads/mariadb-10.1.18-linux-glibc_214-x86_64.tar.gz >/dev/null
4) ln -s /opt/mariadb-10.1.18-linux-glibc_214-x86_64 /opt/mysql
5) cd mysql
6) scripts/mysql_install_db --basedir=/opt/mysql --datadir=/LabOps/iSupport/data --defaults-file=/LabOps/iSupport/conf/mariadb.cnf --force --user=mysql
OUTPUT:

[mysql@jenkins-maa-01 mysql]$ scripts/mysql_install_db --basedir=/opt/mysql --datadir=/LabOps/iSupport/data --defaults-file=/LabOps/iSupport/conf/mariadb.cnf --force --user=mysql
Installing MariaDB/MySQL system tables in '/LabOps/iSupport/data' ...
2016-11-08 14:06:36 139900257593216 [Note] Using unique option prefix 'data' is error-prone and can break in the future. Please use the full name 'datadir' instead.
2016-11-08 14:06:36 139900257593216 [Note] /opt/mysql/bin/mysqld (mysqld 10.1.18-MariaDB) starting as process 2897 ...
2016-11-08 14:06:36 139900257593216 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-11-08 14:06:36 139900257593216 [Note] InnoDB: The InnoDB memory heap is disabled
2016-11-08 14:06:36 139900257593216 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-11-08 14:06:36 139900257593216 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2016-11-08 14:06:36 139900257593216 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-11-08 14:06:36 139900257593216 [Note] InnoDB: Using Linux native AIO
2016-11-08 14:06:36 139900257593216 [Note] InnoDB: Using SSE crc32 instructions
2016-11-08 14:06:36 139900257593216 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-11-08 14:06:36 139900257593216 [Note] InnoDB: Completed initialization of buffer pool
2016-11-08 14:06:36 139900257593216 [ERROR] InnoDB: Data file ./ibdata1 is of a different size 768 pages (rounded down to MB) than specified in the .cnf file 64000 pages!
2016-11-08 14:06:36 139900257593216 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2016-11-08 14:06:36 139900257593216 [ERROR] Plugin 'InnoDB' init function returned error.
2016-11-08 14:06:36 139900257593216 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-11-08 14:06:36 139900257593216 [ERROR] /opt/mysql/bin/mysqld: unknown option '--log-slow-queries'
2016-11-08 14:06:36 139900257593216 [ERROR] Aborting

Installation of system tables failed!  Examine the logs in
/LabOps/iSupport/data for more information.
 
The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:
 
    shell> /opt/mysql/scripts/scripts/mysql_install_db --defaults-file=~/.my.cnf
 
You can also try to start the mysqld daemon with:
 
    shell> /opt/mysql/bin/mysqld --skip-grant --general-log &
 
and use the command line tool /opt/mysql/bin/mysql
to connect to the mysql database and look at the grant tables:
 
    shell> /opt/mysql/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 /LabOps/iSupport/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
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

[mysql@jenkins-maa-01 mysql]$ cat /LabOps/iSupport/conf/mariadb.cnf
[client-server]
socket=/LabOps/iSupport/temp/mysql.sock
port=3306
 
[client]
#password=my_password
 
[mysqld]
data=/LabOps/iSupport/data
 
loose-innodb_data_file_path = ibdata1:1000M
loose-innodb_file_per_table
 
log-basename=mysqld
 
general-log
log-slow-queries
[mysql@jenkins-maa-01 mysql]$



 Comments   
Comment by Elena Stepanova [ 2016-11-08 ]

The general problem is that the cnf file you are using is not compatible either with the previous installation that you had, or with the server version that you are installing

1) InnoDB fails with the error because your existing datadir has ibdata files of a different size comparing to what's configured in the cnf file; namely, the existing file is smaler than the file size you've configured. InnoDB in 10.0+ has some tablespace resizing capabilities, but it's not one of them. Your options are:

  • if you don't need the old data, just clean the datadir and let installation initialize it from scratch;
  • if you need the old data, but you don't care much about ibdata1 being exactly 1000M, configure it to the size it is de-facto now, and add :autoextend clause to the value, so it could grow further;
  • if you indeed want your ibdata to be precisely 1000M, follow resizing instructions here: http://dev.mysql.com/doc/refman/5.6/en/innodb-resize-system-tablespace.html

2) Further, server also fails due to unknown option log-slow-queries. The option was already deprecated in 5.5 (and probably before), and in 10.x it's removed. Use slow-query-log instead.

Comment by Muthuselvan I K [ 2016-11-08 ]

I am sorry. I am totally tired please help me.

My requirement is I want to install under /opt but I don't have root access on my machine.
What is the steps I need to follow?

thank you

Comment by Elena Stepanova [ 2016-12-08 ]

I am sorry, but bugtracking system is not a place for general discussion, we cannot lead you through the whole installation process here. Your configuration has problems as listed above (at least). If you don't know how to fix them, please try to ask for help and advice on corresponding forums, channels or mailing lists.
Examples:
IRC channel: #maria
Mailing list: maria-discuss@lists.launchpad.net

You might also consider getting a support contract.

Generated at Thu Feb 08 07:48:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.