Plesk无法安装mysql

时间:2018-08-17 13:30:26

标签: mysql ubuntu amazon-ec2 plesk plesk-onyx

尝试在我拥有的ec2(当前正在运行3个站点)上安装plesk。据我了解,plesk仅能在普通服务器上使用(希望不是这种情况)。

安装失败:

Synchronizing state of mysql.service with SysV init with /lib/systemd/systemd- 
sysv-install...
Executing /lib/systemd/systemd-sysv-install enable mysql

此后错误是:

 Trying to establish test connection... mysql: [Warning] World-writable config                
 file '/root/.my.cnf' is ignored.
 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: 
 NO) failed
 One more attempt to connect

 ERROR while trying to establish test connection. If you are installing Plesk 
on an already configured MySQL server, you need to specify the administrator's 
credentials to succeed with the installation. To do this, you need to create a 
file - /root/.my.cnf with the 'client' section where you need to provide user 
and its password ("user = $admin_name" and "password = $admin_pass"). After 
installation is finished, the file /root/.my.cnf will be renamed to 
/root/.my.cnf.bak
Check the error reason(see log file: 
/var/log/plesk/install/plesk_17.8.11_installation.log), fix and try again

 *****  problem report *****
ERROR while trying to establish test connection. If you are installing Plesk on 
an already configured MySQL server, you need to specify the administrator's 
credentials to succeed with the installation. To do this, you need to create a 
file - /root/.my.cnf with the 'client' section where you need to provide user 
and its password ("user = $admin_name" and "password = $admin_pass"). After 
installation is finished, the file /root/.my.cnf will be renamed to 
/root/.my.cnf.bak
Check the error reason(see log file: 
/var/log/plesk/install/plesk_17.8.11_installation.log), fix and try again
sh: 1: /etc/init.d/psa: not found

我已经这样添加文件/root/.my.cnf:

Client
User: xyz
Password: xyzxyz

但是它仍然无法拾取或使用它(一遍又一遍更改权限)。

有人能克服此错误吗?

欢呼

1 个答案:

答案 0 :(得分:0)

是的,可以在已安装mysql的服务器上安装Plesk。 需要创建一个/root/.my.cnf文件,该文件具有对mysql的根访问权限:

# cat /root/.my.cnf
[client]
user = root
password = root_password

但是不建议在已经运行站点的服务器上安装Plesk,因为可以更改apache和nginx配置文件。