mysql 설치 오류 치명적 오류 : ./bin/my_print_defaults 솔루션을 찾을 수 없습니다.

mysql 데이터베이스를 초기화하는 동안 다음 오류 메시지가보고됩니다.

 

1

2

4

5

6

7

[root@localhost scripts]# ./mysql_install_db --user=mysql

FATAL ERROR: Could not find ./bin/my_print_defaults

If you compiled from source, you need to run 'make install' to

copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top

level of the extracted archive, or pass the --basedir option

pointing to that location.

 

오류 메시지에 따라 mysql 설치 디렉터리의 bin 디렉터리로 이동하여 _print_defaults가 있는지 확인합니다.이 파일은 첫 번째 열의 7 번째 줄에 있습니다.

 

1

2

4

5

6

7

8

9

10

11

12

13

14

15

[root@localhost bin]# ls

innochecksum       mysql_client_test           mysql_setpermission

msql2mysql         mysql_client_test_embedded  mysqlshow

myisamchk          mysql_config                mysqlslap

myisam_ftdump      mysql_convert_table_format  mysqltest

myisamlog          mysqld                      mysqltest_embedded

myisampack         mysqld_multi                mysql_tzinfo_to_sql

my_print_defaults  mysqld_safe                 mysql_upgrade

mysql              mysqldump                   mysql_waitpid

mysqlaccess        mysqldumpslow               mysql_zap

mysqlaccess.conf   mysql_find_rows             perror

mysqladmin         mysql_fix_extensions        replace

mysqlbinlog        mysqlhotcopy                resolveip

mysqlbug           mysqlimport                 resolve_stack_dump

mysqlcheck         mysql_secure_installation

 

 

그런 파일이 없다는 것이 아니라 문제가 아닌 것 같습니다.

오류 메시지를주의 깊게 확인하십시오. 경로가 mysql 설치 디렉토리로 시작하는 상대 경로임을 알 수 있습니다.

초기화는 초기화 스크립트 디렉토리에서 스크립트를 실행하는 것이며이 디렉토리에는 ./bin/my_print_defaults가 없습니다.

따라서 설치 디렉토리로 돌아가 상대 경로로 초기화 스크립트를 실행하십시오.

 

1

2

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

[root@localhost mysql]# ./scripts/mysql_install_db --user=mysql

Installing MySQL system tables...

OK

Filling help tables...

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 MySQL root USER !

To do so, start the server, then issue the following commands:

./bin/mysqladmin -u root password 'new-password'

./bin/mysqladmin -u root -h localhost.localdomain password 'new-password'

Alternatively you can run:

./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 manual for more instructions.

You can start the MySQL daemon with:

cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd ./mysql-test ; perl mysql-test-run.pl

Please report any problems with the ./bin/mysqlbug script!

[root@localhost mysql]#

 

확인! 초기화 성공!

추천

출처blog.csdn.net/Erica_1230/article/details/104816149