Article ID: 228, created on Dec 13, 2013, last review on May 6, 2014

  • Applies to:
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Windows
  • Plesk 11.5 for Windows

问题

Plesk 安装失败出现以下错误:


Trying to connect with admin:setup account...ERROR 1045:Access denied for user:'admin@localhost' (Using password:YES)
not connected
Trying to connect as root with empty password...ERROR 1045:Access denied for user:'root@localhost' (Using password:NO)
not connected Cannot connect to mysql database.



解决方案

要安装 Plesk,通常 MySQL 管理员必须为带有空密码的 'root' 用户。如果您知道当前 'root' MySQL 密码,请使用该密码登录并从第 2 步骤继续查询。如果您不知道密码,请从第 1 步骤开始:

1. 添加 'skip-grant-tables' 选项到 /etc/my.cnf in '[mysqld]' 部分并重启 MySQL:

2.为 MySQL 'root' 用户设置空密码:
# mysql -uroot -Dmysql -e 'update user set password="" where user="root"'

3.在 /etc/my.cnf 中注释或移除字串 'skip-grant-tables' 并重启 MySQL。

4.尝试再次安装 Plesk。

还可以查看文章 Plesk admin 密码恢复

a914db3fdc7a53ddcfd1b2db8f5a1b9c 56797cefb1efc9130f7c48a7d1db0f0c 29d1e90fd304f01e6420fbe60f66f838 85a92ca67f2200d36506862eaa6ed6b8 46a8e394d6fa13134808921036a34da8 bd7fc88cf1b01f097749ae6f87272128 01bc4c8cf5b7f01f815a7ada004154a2 0a53c5a9ca65a74d37ef5c5eaeb55d7f ed7be2b984f9c27de1d2dc349dc19c6d a766cea0c28e23e978fa78ef81918ab8

Email subscription for changes to this article