Reputation: 25
Just did a fresh install of CWP on Centos 7. But when i try to start it i get this error:
######################
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
I have checked and made sure that my Root SQL password and the password in the CWP config file is the same.
But i see that the CWP_root database does not exist in SQL.
Is there any way of reinstalling cwp or fiixing the database without reinstalling the entire server.
Upvotes: 0
Views: 4611
Reputation: 244
login by root and write mysql -u root -p after this write your database password and SHOW DATABASES; in case not exists CREATE DATABASE root_cwp ; if steps success ، return try your setup but is database exists try change database password and return try your setup . if you can not login to database try mysql_secure_installation and reset password or
mysql> use mysql;
mysql> update user set password=PASSWORD("yournewrootpasshere") where User='root'; mysql> flush privileges; mysql> quit
sorry my bad english Hope to help you
Upvotes: 1