189 8069 5689

MySQL5.6初始化数据库时报错FATALERROR:Couldnotfind./bin/my_print_defaults怎么办

本篇内容主要讲解“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怎么办”有了更深的了解,不妨来实际操作一番吧!这里是创新互联网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!


网站栏目:MySQL5.6初始化数据库时报错FATALERROR:Couldnotfind./bin/my_print_defaults怎么办
标题来源:http://cdxtjz.com/article/ijigps.html

其他资讯