[MDEV-12154] mysql_install_db fail Created: 2017-03-01  Updated: 2017-03-01  Resolved: 2017-03-01

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

Type: Task Priority: Major
Reporter: seoungho Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None

Attachments: Text File mysql_install_db_strace.txt    

 Description   

I execute bottom command.
mysql_install_db --defaults-file=/etc/my.cnf --datadir=/maria_data/db01 --basedir=/maria/mariadb --user=maria

I got a error message. what shall I do for fixing this error?

[maria@cento7 mariadb]$ ./scripts/mysql_install_db --defaults-file=/etc/my.cnf --datadir=/maria_data/db01 --basedir=/maria/mariadb --user=maria
Installing MariaDB/MySQL system tables in '/maria_data/db01' ...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'/maria/mariadb/bin/mysqladmin' -u root password 'new-password'
'/maria/mariadb/bin/mysqladmin' -u root -h cento7 password 'new-password'

Alternatively you can run:
'/maria/mariadb/bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd '/maria/mariadb' ; /maria/mariadb/bin/mysqld_safe --datadir='/maria_data/db01'

You can test the MariaDB daemon with mysql-test-run.pl
cd '/maria/mariadb/mysql-test' ; perl mysql-test-run.pl

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/

[maria@cento7 mariadb]$

log-error messages bottom
[root@cento7 trc]# ls
mysql.err
[root@cento7 trc]# cat mysql.err
100 200 300 400 500 600 700 800 900 1000
100 200 300 400 500 600 700 800 900 1000
100 200
100 200
100 200
100 200
100 200
100 200
100 200
100 200
2017-03-01 12:26:55 140272513292160 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-03-01 12:26:55 140272513184512 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
[root@cento7 trc]#



 Comments   
Comment by seoungho [ 2017-03-01 ]

strace ./scripts/mysql_install_db --defaults-file=/etc/my.cnf --datadir=/maria_data/db01 --user=maria
I upload strace.

Comment by seoungho [ 2017-03-01 ]

strace show me a error.

rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
close(4) = 0
close(4) = -1 EBADF (Bad file descriptor)
pipe([4, 5]) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [CHLD], 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7ff89c622a10) = 4204
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
close(3) = 0
close(5) = 0
close(3) = -1 EBADF (Bad file descriptor)
close(5) = -1 EBADF (Bad file descriptor)
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [CHLD], 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7ff89c622a10) = 4205
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
close(4) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0
rt_sigaction(SIGINT,

{0x43e670, [], SA_RESTORER, 0x7ff89bc61250}, {SIG_DFL, [], SA_RESTORER, 0x7ff89bc61250}, 8) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 4203
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}]
, 0, NULL) = 4204
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 4205
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7ff89bc61250}, {0x43e670, [], SA_RESTORER, 0x7ff89bc61250}

, 8) = 0
close(4) = -1 EBADF (Bad file descriptor)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
— SIGCHLD

{si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=4203, si_status=0, si_utime=0, si_stime=0}


wait4(-1, 0x7ffdc3527690, WNOHANG, NULL) = -1 ECHILD (No child processes)

Comment by seoungho [ 2017-03-01 ]

[maria@cento7 mariadb]$ gdb
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-94.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb)

(gdb) exec-file /maria/mariadb/bin/mysqld

(gdb) run --defaults-file=/etc/my.cnf --datadir=/maria_data/db01 --user=maria --basedir=/maria/mariadb
Starting program: /maria/mariadb/bin/mysqld --defaults-file=/etc/my.cnf --datadir=/maria_data/db01 --user=maria --basedir=/maria/mariadb
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
2017-03-01 14:07:27 140737354000256 [Note] /maria/mariadb/bin/mysqld (mysqld 10.2.4-MariaDB-log) starting as process 5137 ...
2017-03-01 14:07:27 140737354000256 [Warning] Changed limits: max_open_files: 1024 max_connections: 214 table_cache: 400
[New Thread 0x7fffc23ff700 (LWP 5141)]
[New Thread 0x7fffb6bff700 (LWP 5142)]
[New Thread 0x7fffab7ff700 (LWP 5143)]
[New Thread 0x7fffaaffe700 (LWP 5144)]
[New Thread 0x7fffaa7fd700 (LWP 5145)]
[New Thread 0x7fffa9ffc700 (LWP 5146)]
[New Thread 0x7fffa97fb700 (LWP 5147)]
[Thread 0x7fffa97fb700 (LWP 5147) exited]
[Thread 0x7fffab7ff700 (LWP 5143) exited]
[Thread 0x7fffa9ffc700 (LWP 5146) exited]
[Thread 0x7fffaaffe700 (LWP 5144) exited]
[Thread 0x7fffaa7fd700 (LWP 5145) exited]
[Thread 0x7fffb6bff700 (LWP 5142) exited]
[Thread 0x7fffc23ff700 (LWP 5141) exited]
[Inferior 1 (process 5137) exited with code 01]
Missing separate debuginfos, use: debuginfo-install glibc-2.17-157.el7.x86_64 libaio-0.3.109-13.el7.x86_64 libgcc-4.8.5-11.el7.x86_64 libstdc++-4.8.5-11.el7.x86_64 nss-softokn-freebl-3.16.2.3-14.4.el7.x86_64
(gdb)

Comment by seoungho [ 2017-03-01 ]

I solved this problem

[maria@cento7 ~]$ cat /etc/security/limits.conf

  1. End of file
    maria soft nofile 65536
    maria hard nofile 65536
    maria soft nproc 2047
    maria hard nproc 16384
Comment by Sergei Golubchik [ 2017-03-01 ]

Closing, as requested

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