您好,登錄后才能下訂單哦!
這篇文章給大家分享的是有關MySQL 5.5初始化數據庫報錯FATAL ERROR: Could not find my_print_defaults怎么辦的內容。小編覺得挺實用的,因此分享給大家做個參考,一起跟隨小編過來看看吧。
執行初始化MySQL數據庫的數據文件路徑,并且創建系統表,發生報錯
[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.
報錯原因:
和執行操作的路徑有關,執行的路徑是/mysql_software_55/Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101
解決方法:
將所有軟件文件移動到上一級目錄,刪除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.
感謝各位的閱讀!關于“MySQL 5.5初始化數據庫報錯FATAL ERROR: Could not find my_print_defaults怎么辦”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,讓大家可以學到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。