Failed:access denied for user ' root ' @ ' localhost ' (using Password:yes) At/usr/bin/innobackupex Lin

Source: Internet
Author: User
Tags dsn reserved percona
[Root@t1/]# Innobackupex--user=root--password/mydata/data/tmp/dir/


InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona LLC and/or its affiliates 2009-2013. All Rights Reserved.


This software is published under
The GNU general public LICENSE Version 2, June 1991.


Get the latest version of Percona Xtrabackup, documentation, and help:
http://www.percona.com/xb/p


160309 07:09:49 innobackupex:executing A version check against the server ...
160309 07:09:49 innobackupex:connecting to MySQL server with DSN ' dbi:mysql:;mysql_read_default_group=xtrabackup ' as ' ro OT ' (using Password:yes).
Innobackupex:got a fatal error with the following Stacktrace:at/usr/bin/innobackupex line 3011
Main::mysql_connect (' Abort_on_error ', 1) called At/usr/bin/innobackupex Line 1551
innobackupex:Error:Failed to connect to MySQL server:dbi connect ('; Mysql_read_default_group=xtrabackup ', ' Root ',...) Failed:access denied for user ' root ' @ ' localhost ' (using Password:yes) At/usr/bin/innobackupex line 2995
160309 07:09:49 innobackupex:connecting to MySQL server with DSN ' dbi:mysql:;mysql_read_default_group=xtrabackup ' as ' ro OT ' (using Password:yes).
Innobackupex:got a fatal error with the following Stacktrace:at/usr/bin/innobackupex line 3011
Main::mysql_connect (' Abort_on_error ', 1) called At/usr/bin/innobackupex Line 1570
innobackupex:Error:Failed to connect to MySQL server:dbi connect ('; Mysql_read_default_group=xtrabackup ', ' Root ',...) Failed:access denied for user ' root ' @ ' localhost ' (using Password:yes) At/usr/bin/innobackupex line 2995


[Root@t1/]# mysqladmin-uroot-p password ' jsb ' Enter password:
Mysqladmin:connect to server at ' localhost ' failed

Error: ' Access denied for user ' root ' localhost ' (using Password:yes) '


Solve:


[Root@t1/]#/etc/init.d/mysql stop
-bash:/etc/init.d/mysql:no such file or directory
[Root@t1/]#/etc/init.d/mysqld Stop
Shutting down MySQL .... success!
[Root@t1/]# mysqld_safe--user=mysql--skip-grant-tables--skip-networking &
[1] 12693
[Root@t1/]# 160309 07:11:26 mysqld_safe Logging to '/mydata/data/t1.err '.
160309 07:11:26 Mysqld_safe starting mysqld daemon with databases From/mydata/data


[root@t1/]# mysql-u root MySQL
Reading table information for completion of table and column names
You can turn off the feature to get a quicker startup with-a


Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 1
Server Version:5.6.10-log MySQL Community Server (GPL)


Copyright (c), 2013, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark the Oracle Corporation and/or its
Affiliates. Names may trademarks of their respective
Owners.


Type ' help, ' or ' \h ' for help. Type ' \c ' to clear the current input statement.


mysql> UPDATE user SET Password=password (' JSB ') where user= ' root ';
Query OK, 4 rows affected (0.01 sec)
Rows Matched:4 Changed:4 warnings:0


mysql> FLUSH privileges;
Query OK, 0 rows Affected (0.00 sec)


Mysql> quit
Bye

[Root@t1/]#/etc/init.d/mysqld Restart


Shutting down MySQL. 160309 07:12:49 mysqld_safe mysqld from PID File/mydata/data/t1.pid ended
success!
Starting MySQL. success!
[1]+ done Mysqld_safe--user=mysql--skip-grant-tables--skip-networking
[Root@t1/]# MYSQL-UROOT-PJSB
Warning:using a password on the command line interface can is insecure.
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 1
Server Version:5.6.10-log MySQL Community Server (GPL)


Copyright (c), 2013, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark the Oracle Corporation and/or its
Affiliates. Names may trademarks of their respective
Owners.


Type ' help, ' or ' \h ' for help. Type ' \c ' to clear the current input statement.


Mysql> exit
Bye


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.