Can't locate Digest/MD5.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at - line 693. BEGIN failed--compilation aborted at - line 693. 230608 11:43:23 Connecting to MySQL server host: localhost, user: (null), password: not set, port: 0, socket: /var/lib/mysql/mysql.sock Failed to connect to MySQL server: Access denied for user 'root'@'localhost' (using password: NO).
时间: 2023-07-07 11:42:46 浏览: 170
这个错误提示表示在执行某个程序时,无法找到 Digest::MD5 模块。可能是因为该模块没有正确安装或者没有被正确配置到 Perl 的搜索路径中。您可以尝试安装 Digest::MD5 模块,可以使用以下命令:
```
sudo yum install perl-Digest-MD5
```
如果您使用的是其他操作系统,请使用相应的包管理器来安装该模块。
另外,错误提示还提到了无法连接到 MySQL 服务器的问题。这可能是因为没有正确配置 MySQL 的用户名和密码,或者没有使用正确的端口和套接字。您可以检查您的 MySQL 配置文件,确认用户名、密码、端口和套接字是否都正确设置并与您的程序匹配。
相关问题
Can't locate Locale/gettext.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 / usr/share/perl5 .).
The error message suggests that the Perl module "Locale::gettext" is missing on your system. To resolve this issue, you can follow these steps:
1. Update the package manager and install the necessary packages:
```
sudo yum update
sudo yum install -y perl-CPAN gettext-devel
```
2. Launch the CPAN shell to install the missing module:
```
sudo cpan
```
3. In the CPAN shell, install the "Locale::gettext" module:
```
install Locale::gettext
```
4. Follow the prompts and let CPAN handle the installation process. It may take a few minutes to download and install the module and its dependencies.
Once the installation is complete, you should be able to run your Perl script without encountering the "Can't locate Locale/gettext.pm" error.
[root@test ~]# xtrabackup --defaults-file=/etc/my.cnf --user=root --password=123qqq...A --socket=/var/lib/mysql/mysql.sock --target-dir=/var/lib/mysql/backups/ --backup Can't locate Digest/MD5.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at - line 693. BEGIN failed--compilation aborted at - line 693. 230608 11:55:11 Connecting to MySQL server host: localhost, user: root, password: set, port: 0, socket: /var/lib/mysql/mysql.sock Error: Unsupported server version: '5.7.42-log'. Please report a bug at https://bugs.launchpad.net/percona-xtrabackup
根据你提供的信息,xtrabackup 在执行备份时出现了错误。错误信息中提到了 "Can't locate Digest/MD5.pm",这意味着你的 Perl 环境缺少 Digest::MD5 模块。
你需要安装 Digest::MD5 模块并重新运行备份命令。你可以使用下面的命令安装该模块:
```
yum install perl-Digest-MD5
```
同时,错误信息中也提到了 "Unsupported server version: '5.7.42-log'",这意味着你的 MySQL 服务器版本不被支持。你需要升级 xtrabackup 或降低 MySQL 服务器版本以解决这个问题。
阅读全文