Solve the problem of Couldnotfind./bin/my_print_defaults_MySQL during MySQL initialization

Source: Internet
Author: User
Solve the Couldnotfind. binmy_print_defaults error when initializing MySQL database.

[Root @ mysqld1 scripts] #. /mysql_install_db -- user = mysql -- datadir =/var/lib/mysql -- socket =/var/lib/mysql. sock -- pid-file =/var/run/mysqld. pid -- log-error =/var/log/mysqld. log
Fatal error: cocould not find./bin/my_print_defaults

If you compiled from source, you need to run 'make install'
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.

Solution

[Root @ mysqld1 scripts] #. /mysql_install_db -- user = mysql -- datadir =/var/lib/mysql -- socket =/var/lib/mysql. sock -- pid-file =/var/run/mysqld. pid -- log-error =/var/log/mysqld. log-- Basedir =/usr/local/mysql
Installing MySQL system tables... 06:27:45 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use -- explicit_defaults_for_timestamp server option (see documentation for more details ).
OK

Filling help tables... 2014-05-06:27:47 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use -- explicit_defaults_for_timestamp server option (see documentation for more details ).
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:

/Usr/local/mysql/bin/mysqladmin-u root password 'new-password'
/Usr/local/mysql/bin/mysqladmin-u root-h mysqld1.clvn.com.cn password 'new-password'

Alternatively you can run:

/Usr/local/mysql/bin/mysql_secure_installation

Which will also give you the option of removing the test
Databases and anonymous user created by default. This is
Stronugly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon:

Cd.;/usr/local/mysql/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

Http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

WARNING: Found existing config file/usr/local/mysql/my. cnf on the system.
Because this file might be in use, it was not replaced,
But was used in bootstrap (unless you used -- defaults-file)
And when you later start the server.
The new default config file was created as/usr/local/mysql/my-new.cnf,
Please compare it with your file and take the changes you need.

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
-- Defaults-file argument to mysqld_safe when starting the server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.