找不到CWP数据库

时间:2018-06-15 10:25:15

标签: mysql centos7 centos-web-panel

刚刚在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或固定数据库而无需重新安装整个服务器。

1 个答案:

答案 0 :(得分:0)

通过root登录 并在写入数据库密码后写入mysql -u root -p 显示数据库; 万一不存在  创建数据库root_cwp;  如果步骤成功,返回,请尝试设置 但是数据库是否存在,请尝试更改数据库密码,然后返回以尝试进行设置。 如果您无法登录数据库,请尝试mysql_secure_installation并重置密码 或

mysql> use mysql; 

mysql>更新用户设置密码= PASSWORD(“ yournewrootpasshere”),其中User ='root'; mysql>刷新权限; mysql>退出

对不起,我的英语不好 希望对您有帮助