Can you help me plzz

Started by thanhblog.info, May 01, 2019, 04:34:49 PM

Previous topic - Next topic

thanhblog.info

My vps is have problem:

Quote
Warning: mysqli_connect(): (HY000/1049): Unknown database 'root_cwp' in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/1045): Access denied for user 'postfix'@'localhost' (using password: YES) in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/1045): Access denied for user 'postfix'@'localhost' (using password: YES) in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0

Warning: mysqli_connect(): (HY000/1049): Unknown database 'root_cwp' in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0


Trying to start mysql server, please wait!
Try to restart CentOS Web Panel with command: sh /scripts/restart_cwpsrv

**Check your MySQL root password in: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php and /root/.my.cnf


Warning: mysqli_error() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
Could not connect:

Plz help me. Tks all so much!

Netino

** Important (as your error message itself):
===========================================================================================
**Check your MySQL root password in: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php and /root/.my.cnf
===========================================================================================

This means the root password in file:
     /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
and in the file:
     /root/.my.cnf
must be exactly the same.

Check that.

Regards,
Netino

thanhblog.info

root password is same, but this not action. Can you help me! Tks

Igor S.

Hello.

Try to check if MySQL server is active and has root_cwp database.



You can ask me to solve any problem with your server for some money in pm  ;)






Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions

Get Fast Support Here
http://centos-webpanel.com/support-services

leebrimlow

I had the same issue , this code saved me.

login using SSH and paste the code:
# systemctl stop mysqld

#systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"

# systemctl start mysqld

i hope it works for you :)

Igor S.

Quote from: leebrimlow on May 30, 2019, 09:23:32 AM
I had the same issue , this code saved me.

login using SSH and paste the code:
# systemctl stop mysqld

#systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"

# systemctl start mysqld

i hope it works for you :)


Never do things like that!!!



You can ask me to solve any problem with your server for some money in pm  ;)






Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions

Get Fast Support Here
http://centos-webpanel.com/support-services

adamjedgar

Here is a post on stack exchange about doing this to regain access to root user account...

How to re-take control of the root user in MySQL.

DANGER: RISKY OPERATTION

Start session ssh (using root if possible).
Edit my.cnf file using.

sudo vi /etc/my.cnf
Add line to mysqld block.*

skip-grant-tables
Save and exit.

Restart MySQL service.

service mysql restart
Check service status.

service mysql status
Connect to mysql.

mysql
Using main database.

use mysql;
Redefine user root password.

UPDATE user SET `authentication_string` = PASSWORD('myNuevoPassword') WHERE `User` = 'root';
Edit file my.cnf.

sudo vi /etc/my.cnf
Erase line.

skip-grant-tables
Save and exit.

Restart MySQL service.

service mysqld restart
Check service status.

service mysql status
Connect to database.

mysql -u root -p
Type new password when prompted.

This action is very dangerous, it allows anyone to connect to all databases with no restriction without a user and password. It must be used carefully and must be reverted quickly to avoid risks.

Igor S.

Hi, just run the next two commands if you'd like to change the MySQL root password:
/scripts/mysql_pwd_reset
cat /root/.my.cnf



You can ask me to solve any problem with your server for some money in pm  ;)






Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions

Get Fast Support Here
http://centos-webpanel.com/support-services