0

刚刚在 Centos 7 上重新安装了 CWP。但是当我尝试启动它时,我收到了这个错误:

######################
Update Server Packages
######################
PHP Warning:  mysqli_connect(): (HY000/1049): Unknown database 'root_cwp' in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
PHP Warning:  main(/usr/local/cwpsrv/htdocs/resources/admin/include/postfix.php): failed to open stream: No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
PHP Warning:  main(): Failed opening '/usr/local/cwpsrv/htdocs/resources/admin/include/postfix.php' for inclusion (include_path='.:/usr/local/cwp/php71/lib/php') in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
PHP Notice:  Undefined variable: db_host_postfix in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
PHP Notice:  Undefined variable: db_user_postfix in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
PHP Notice:  Undefined variable: db_pass_postfix in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
PHP Notice:  Undefined variable: db_name_postfix in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
PHP Warning:  mysqli_connect(): (HY000/1049): Unknown database 'root_cwp' in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php on line 0
PHP Warning:  mysqli_select_db() expects parameter 1 to be mysqli, boolean given in /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php on line 0
Could not select database root_cwp

我已经检查并确保我的 Root SQL 密码和 CWP 配置文件中的密码相同。

但我看到 SQL 中不存在 CWP_root 数据库。

有什么方法可以在不重新安装整个服务器的情况下重新安装 cwp 或修复数据库。

4

1 回答 1

1

以root登录并写入mysql -u root -p,然后写入您的数据库密码和SHOW DATABASES;如果不存在 CREATE DATABASE root_cwp ;如果步骤成功Ì返回尝试您的设置但数据库存在尝试更改数据库密码并返回尝试您的设置。如果您无法登录数据库,请尝试 mysql_secure_installation 并重置密码或

mysql> use mysql; 

mysql> 更新用户设置密码=PASSWORD("yournewrootpasshere") where User='root'; mysql> 刷新权限;mysql>退出

对不起我的英语不好希望能帮助你

于 2018-10-01T17:16:47.163 回答