MySQL INIT login Error Resolution-1

Source: Internet
Author: User
Tags percona

Scene Restore:

Initialization

#/usr/local/webserver/mysql/bin/mysql_install_db--user=mysql--basedir=/usr/local/webserver/mysql/--datadir=/ Home/mysqldata

Installing MySQL system tables ...
150205 11:48:00 [Note] Flashcache bypass:disabled
150205 11:48:00 [Note] Flashcache Setup Error Is:ioctl failed

Ok
Filling Help Tables ...
150205 11:48:00 [Note] Flashcache bypass:disabled
150205 11:48:00 [Note] Flashcache Setup Error Is:ioctl failed

Ok

To start mysqld at boot time with to copy
Support-files/mysql.server to the right place for your system

REMEMBER to SET A PASSWORD for the MySQL root USER!
To does so, start the server, then issue the following commands:

/usr/local/webserver/mysql//bin/mysqladmin-u root password ' new-password '
/usr/local/webserver/mysql//bin/mysqladmin-u root-h kooxoo17.ktep3.kuxun.cn password ' new-password '

Alternatively you can run:
/usr/local/webserver/mysql//bin/mysql_secure_installation

Which would 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/usr/local/webserver/mysql/; /usr/local/webserver/mysql//bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
Cd/usr/local/webserver/mysql//mysql-test; Perl mysql-test-run.pl

Problems with The/usr/local/webserver/mysql//scripts/mysqlbug script!

Percona recommends, all production deployments is 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.

Start

/usr/local/webserver/mysql/bin/mysqld_safe--defaults-file=/etc/my.cnf--user=mysql--basedir=/usr/local/ webserver/mysql/--datadir=/home/mysqldata &

Start normally. Ps-ef | grep MySQL also has a corresponding process to exist

Try these 4 ways to log in:

#/usr/local/webserver/mysql/bin/mysql
ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/tmp/mysql.sock ' (2)

#/usr/local/webserver/mysql/bin/mysql-u Root
ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/tmp/mysql.sock ' (2)

#/usr/local/webserver/mysql/bin/mysql-s/tmp/mysql.sock
ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/tmp/mysql.sock ' (2)

]#/usr/local/webserver/mysql/bin/mysql-u root-s/tmp/mysql.sock
ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/tmp/mysql.sock ' (2)

And the socket specified in MY.CNF is the/tmp/mysql.sock path.

or the following error:

#/usr/local/webserver/mysql/bin/mysql

ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:no)

#/usr/local/webserver/mysql/bin/mysql-u Root

ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:no)

#/usr/local/webserver/mysql/bin/mysql-s/tmp/mysql.sock

ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:no)

#/usr/local/webserver/mysql/bin/mysql-u root-s/tmp/mysql.sock

ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:no)


The reason for this is that it has been initialized several times, but the files generated under DataDir are not deleted every time it is initialized!

Remember, each initialization operation to delete the files produced under DataDir Oh!

MySQL INIT login Error Resolution-1

Related Article

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.