Dowemo
0 0 0 0

Error occurred while xtrabackup was backed up for backup. Server: can 't connect to local mysql server through socket '/tmp/mysql. So '( 2 ).

[root@MySQL-DB ~]# innobackupex --defaults-file=/usr/my.cnf --user=root --password=password/mnt/resource/mysql_backup
160322 22:28:43 innobackupex: Starting the backup operation
IMPORTANT: Please check that the backup run completes successfully.
 At the end of a successful backup run innobackupex
 prints "completed OK!".
160322 22:28:43 version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' as 'root' (using password: YES).
Failed to connect to MySQL server as DBD::mysql module is not installed at - line 1327.
160322 22:28:43 Connecting to MySQL server host: localhost, user: root, password: set, port: 0, socket: (null)
Failed to connect to MySQL server: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

. clip_image001

This happens because I modified the parameter in my. Cnf but didn't modify the socket parameter ( the parameter is empty ), so this error occurred. In addition, I'm trying to replace the mysql data directory, and if you don't configure it correctly.Locate the corresponding MySQL. Sock file location and modify the parameter scoket value in my. Cnf and restart the mysql service to resolve the.

[root@MySQL-DB mysql_backup]# find/-name"mysql.sock"
/var/lib/mysql/mysql.sock

. clip_image002

In addition, in fact, my article error 2002 ( hy000 ): can 't connect to local mysql server through socket '/var/lib/mysql/mysql. Sock '( 2 ) to solve this problem.

In addition, there's a partial solution on the internet that specifies that host = 127.0.0.1 can also avoid this error, and I test it to solve problems. But this is a way to do this.

innobackupex --defaults-file=/usr/my.cnf --user=root --password=password --host=127.0.0.1/mnt/resource/mysql_backup

resources:

://www. Cnblogs. com/fuhj02/p/3541173. Html.




Copyright © 2011 Dowemo All rights reserved.    Creative Commons   AboutUs