溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶(hù)服務(wù)條款》

MySQL 5.5初始化數(shù)據(jù)庫(kù)報(bào)錯(cuò)FATAL ERROR: Could not find my_print_defaults怎么辦

發(fā)布時(shí)間:2021-11-06 16:19:08 來(lái)源:億速云 閱讀:532 作者:小新 欄目:MySQL數(shù)據(jù)庫(kù)

這篇文章給大家分享的是有關(guān)MySQL 5.5初始化數(shù)據(jù)庫(kù)報(bào)錯(cuò)FATAL ERROR: Could not find my_print_defaults怎么辦的內(nèi)容。小編覺(jué)得挺實(shí)用的,因此分享給大家做個(gè)參考,一起跟隨小編過(guò)來(lái)看看吧。

執(zhí)行初始化MySQL數(shù)據(jù)庫(kù)的數(shù)據(jù)文件路徑,并且創(chuàng)建系統(tǒng)表,發(fā)生報(bào)錯(cuò)
[root@MySQL01 Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101]# scripts/mysql_install_db --user=mysql  --basedir=/mysql_software_55/ --datadir=/mysql_55_3306/data/

FATAL ERROR: Could not find my_print_defaults

The following directories were searched:

    /mysql_software_55//bin
    /mysql_software_55//extra

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.

報(bào)錯(cuò)原因:
和執(zhí)行操作的路徑有關(guān),執(zhí)行的路徑是/mysql_software_55/Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101

解決方法:
將所有軟件文件移動(dòng)到上一級(jí)目錄,刪除Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101目錄

cd /mysql_software_55/Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101
[root@MySQL01 Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101]# mv * ..
[root@MySQL01 Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101]# cd ..
[root@MySQL01 mysql_software_55]# rmdir Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101/

[root@MySQL01 mysql_software_55]# ./scripts/mysql_install_db --user=mysql  --basedir=/mysql_software_55/ --datadir=/mysql_55_3306/data/
WARNING: The host 'MySQL01' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
171214  9:56:46 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
171214  9:56:46 [Note] /mysql_software_55//bin/mysqld (mysqld 5.5.58-38.10) starting as process 9175 ...
OK
Filling help tables...
171214  9:56:47 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
171214  9:56:47 [Note] /mysql_software_55//bin/mysqld (mysqld 5.5.58-38.10) starting as process 9182 ...
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:

/mysql_software_55//bin/mysqladmin -u root password 'new-password'
/mysql_software_55//bin/mysqladmin -u root -h MySQL01 password 'new-password'

Alternatively you can run:
/mysql_software_55//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 /mysql_software_55/ ; /mysql_software_55//bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /mysql_software_55//mysql-test ; perl mysql-test-run.pl

Please report any problems at
  https://bugs.launchpad.net/percona-server/+filebug

Percona recommends that all production deployments be protected with a support
contract (http://www.percona.com/mysql-suppport/) to ensure the highest uptime,
be eligible for hot fixes, and boost your team's productivity.

感謝各位的閱讀!關(guān)于“MySQL 5.5初始化數(shù)據(jù)庫(kù)報(bào)錯(cuò)FATAL ERROR: Could not find my_print_defaults怎么辦”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,讓大家可以學(xué)到更多知識(shí),如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到吧!

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI