Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

MySQL 5.5 initialization database error FATAL ERROR: what about Could not find my_print_defaults

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

FATAL ERROR: Could not find my_print_defaults Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.

Initialize MySQL database data file path and create system table, error occurred

[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.

Reason for error:

is related to the path to execute the operation, which is/mysql_software_55/Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101

Solution:

Move all software files to a higher directory and delete Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101 directory

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.

Thank you for reading! About "MySQL 5.5 initialization database error FATAL ERROR: Could not find my_print_defaults how to do" This article is shared here, I hope the above content can be of some help to everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report