Author Topic: Can you help me plzz  (Read 7454 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Can you help me plzz
« on: May 01, 2019, 04:34:49 PM »
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!

Offline
***
Re: Can you help me plzz
« Reply #1 on: May 01, 2019, 10:05:58 PM »
** 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

Offline
*
Re: Can you help me plzz
« Reply #2 on: May 02, 2019, 08:12:40 AM »
root password is same, but this not action. Can you help me! Tks

Offline
*****
Re: Can you help me plzz
« Reply #3 on: May 10, 2019, 08:53:34 AM »
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

Offline
*
Re: Can you help me plzz
« Reply #4 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 :)

Offline
*****
Re: Can you help me plzz
« Reply #5 on: May 31, 2019, 12:31:57 PM »
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

Offline
**
Re: Can you help me plzz
« Reply #6 on: May 31, 2019, 05:32:36 PM »
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.

Offline
*****
Re: Can you help me plzz
« Reply #7 on: June 01, 2019, 09:57:59 AM »
Hi, just run the next two commands if you'd like to change the MySQL root password:
Code: [Select]
/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