本篇内容主要讲解“MySQL 5.6初始化数据库时报错FATAL ERROR: Could not find ./bin/my_print_defaults怎么办”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“MySQL 5.6初始化数据库时报错FATAL ERROR: Could not find ./bin/my_print_defaults怎么办”吧!
MySQL 5.6初始化数据库时报错
[root@localhost scripts]# ./mysql_install_db --defaults-file=/etc/my_5.6_3306.cnf --datadir=/my3306/data/ --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
[root@localhost mysql_software_56]# /mysql_software_56/scripts/mysql_install_db --defaults-file=/etc/my_5.6_3306.cnf --datadir=/my3306/data/ --user=mysql
Installing MySQL system tables...2017-07-29 02:01:18 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2017-07-29 02:01:18 0 [Note] ./bin/mysqld (mysqld 5.6.37-log) starting as process 50198 ...
OK
Filling help tables...2017-07-29 02:03:47 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
2017-07-29 02:03:47 0 [Note] ./bin/mysqld (mysqld 5.6.37-log) starting as process 50239 ...
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_56/bin/mysqladmin -u root password 'new-password'
/mysql_software_56/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
Alternatively you can run:
/mysql_software_56/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_56/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 at http://bugs.mysql.com/
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
New default config file was created as ./my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings
WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
--defaults-file argument to mysqld_safe when starting the server
到此,相信大家对“MySQL 5.6初始化数据库时报错FATAL ERROR: Could not find ./bin/my_print_defaults怎么办”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。