centos7 mariadb 설치중 질문있습니다. ./scripts/mysql_install_db --us...

centos7 mariadb 설치중 질문있습니다. ./scripts/mysql_install_db --us...

작성일 2018.03.03댓글 1건
    게시물 수정 , 삭제는 로그인 필요

[root@localhost mariadb]# ./scripts/mysql_install_db --user=mysql --datadir=/apm/apps/data  --defaults-file=/apm/server/conf/my.cnf
./bin/my_print_defaults: Can't read dir of '/apm/server/conf/my.cnf.d' (Errcode: 2 "No such file or directory")
Fatal error in defaults handling. Program aborted
Installing MariaDB/MySQL system tables in '/apm/apps/data' ...
./bin/mysqld: Can't read dir of '/apm/server/conf/my.cnf.d' (Errcode: 2 "No such file or directory")
Fatal error in defaults handling. Program aborted

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

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

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

You can also try to start the mysqld daemon with:

    shell> ./bin/mysqld --skip-grant-tables --general-log &

and use the command line tool ./bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> ./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 /apm/apps/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


#centos7 mariadb 설치 #centos7 mariadb 10.6 설치 #centos7 mariadb #centos7 mariadb 삭제 #centos7 mariadb 10.11 설치 #centos7 mariadb 10.3 설치 #centos7 mariadb 수동 설치 #centos7 mariadb 10 설치 #centos mariadb 10 #centos7 mariadb install

profile_image 익명 작성일 -

안녕하세요? 지식파트너 가비아입니다.

질문자께서 질문한 내용에 답변 드립니다.

질문자께 나타나는 증상은 --defaults-file 옵션으로 지정되어있는

/apm/server/conf/my.cnf 파일에 /apm/apps/data/my.cnf.d 를

include 하는 옵션이 포함되어있으나, /apm/apps/data/my.cnf.d 디렉토리가

존재하지 않아 나타나는 증상으로 보입니다.

테스트로 /apm/server/conf/my.cnf 파일 내용 안에

# include all files from the config directory
#
!includedir /apm/apps/conf/my.cnf.d

설정 후 mariadb 실행 시 

# mysql_install_db --user=mysql --datadir=/apm/apps/data   --defaults-file=/apm/server/conf/my.cnf
/usr/bin/my_print_defaults: Can't read dir of '/apm/apps/conf/my.cnf.d'  (Errcode: 2 "No such file or directory")
Fatal error in defaults handling. Program aborted
.
.
Installing MariaDB/MySQL system tables in '/apm/apps/data' ...
/usr/sbin/mysqld: Can't read dir of '/apm/apps/conf/my.cnf.d' (Errcode:  2 "No such file or directory")
Fatal error in defaults handling. Program aborted


동일하게 에러가 발생하는 부분이 확인됩니다.

따라서 에러를 해결하기 위해서는

아래와 같이 /apm/apps/data/my.cnf.d 디렉토리를 생성해 주거나

# mkdir -p /apm/apps/data/my.cnf.d
# mysql_install_db --user=mysql  --datadir=/apm/apps/data  --defaults-file=/apm/server/conf/my.cnf
Installing MariaDB/MySQL system tables in '/apm/apps/data' ...
OK

또는

설정파일 내에서 includedir 부분을 주석처리 하면 됩니다.

# vi /apm/server/conf/my.cnf
----------------------------------------
# include all files from the config directory
#
#!includedir /apm/apps/data/my.cnf.d
----------------------------------------
# mysql_install_db --user=mysql --datadir=/apm/apps/data    --defaults-file=/apm/server/conf/my.cnf
Installing MariaDB/MySQL system tables in '/apm/apps/data' ...
OK

도움이 되셨나요? 가비아 였습니다.

MySQL MariaDB 컴파일 설치 중 궁금점

CentOS 서버에 Mysql과 MariaDB를 소스파일을... 를 설치해야 하는데 소스파일의 make install 까진... mysql 설치 중 # cp my-default.cnf /etc/my.cnf 을 해서...

리눅스에서 mysql 설치 오류

... [root@bga mysql ]# scripts/mysql_install_db --user=mysql scripts/mysql_install_db: line 204: ./bin/my_print_defaults: cannot execute binary file Neither host...