Author Topic: What's going on?  (Read 170 times)

0 Members and 1 Guest are viewing this topic.

Offline
**
What's going on?
« on: June 04, 2025, 12:51:04 AM »
I was working on a website in one of my accounts and I needed to check which account it was created under so I fire up the root cwp and I see this and now no sites can be gotten to due to mysql errors. I looked in both of the mysql password files, the passwords do match ok.


Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'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 'root'@'localhost' (using password: YES) in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0


Trying to start mysql server, please wait!
Try to restart Control 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
You can reset the MySQL root password fast with this command: /scripts/mysql_pwd_reset -q


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

Offline
*****
Re: What's going on?
« Reply #1 on: June 04, 2025, 01:05:32 AM »
Did you just update MariaDB? What OS are you running? Did you confirm the expected r00t password matches between
/ usr / local /cwpsrv/htdocs/resources/admin/include/db_conn.php
and
/ root /.my.cnf

Offline
**
Re: What's going on?
« Reply #2 on: June 04, 2025, 01:10:07 AM »
Did you just update MariaDB? What OS are you running? Did you confirm the expected r00t password matches between
/ usr / local /cwpsrv/htdocs/resources/admin/include/db_conn.php
and
/ root /.my.cnf

No and Yes I did

Offline
**
Re: What's going on?
« Reply #3 on: June 04, 2025, 01:10:52 AM »
More errors being thrown. I am able to get into ssh but not cwp:

Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0

Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0


Trying to start mysql server, please wait!
Try to restart Control 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
You can reset the MySQL root password fast with this command: /scripts/mysql_pwd_reset -q


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

Offline
**
Re: What's going on?
« Reply #4 on: June 04, 2025, 01:28:01 AM »
I just ran a status on mysql and got the following:

● mariadb.service - MariaDB 10.11.13 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) since Wed 2025-06-04 03:26:01 CEST; 5s ago
     Docs: man:mariadbd(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 52429 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 52401 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   &>
  Process: 52399 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 52417 (mariadbd)
   Status: "Taking your SQL requests now..."
    Tasks: 17 (limit: 379983)
   Memory: 150.9M
   CGroup: /system.slice/mariadb.service
           └─52417 /usr/sbin/mariadbd

Jun 04 03:26:00 viking.dragocom.xyz mariadbd[52417]: 2025-06-04  3:26:00 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
Jun 04 03:26:00 viking.dragocom.xyz mariadbd[52417]: 2025-06-04  3:26:00 0 [Note] InnoDB: log sequence number 54626253661; transaction i>
Jun 04 03:26:00 viking.dragocom.xyz mariadbd[52417]: 2025-06-04  3:26:00 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_>
Jun 04 03:26:00 viking.dragocom.xyz mariadbd[52417]: 2025-06-04  3:26:00 0 [Note] Plugin 'FEEDBACK' is disabled.
Jun 04 03:26:00 viking.dragocom.xyz mariadbd[52417]: 2025-06-04  3:26:00 0 [Note] Server socket created on IP: '0.0.0.0'.
Jun 04 03:26:00 viking.dragocom.xyz mariadbd[52417]: 2025-06-04  3:26:00 0 [Note] Server socket created on IP: '::'.
Jun 04 03:26:00 viking.dragocom.xyz mariadbd[52417]: 2025-06-04  3:26:00 0 [Note] /usr/sbin/mariadbd: ready for connections.
Jun 04 03:26:00 viking.dragocom.xyz mariadbd[52417]: Version: '10.11.13-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Maria>
Jun 04 03:26:01 viking.dragocom.xyz mariadbd[52417]: 2025-06-04  3:26:01 0 [Note] InnoDB: Buffer pool(s) load completed at 250604  3:26:>
Jun 04 03:26:01 viking.dragocom.xyz systemd[1]: Started MariaDB 10.11.13 database server.

Offline
*****
Re: What's going on?
« Reply #5 on: June 04, 2025, 01:34:37 AM »
If MariaDB is up and ready try:
service cwpsrv restart

Offline
**
Re: What's going on?
« Reply #6 on: June 04, 2025, 01:39:57 AM »
If MariaDB is up and ready try:
service cwpsrv restart

I'll try it again. It's not a space issue:

[root@viking ~]# df -h
Filesystem                  Size  Used Avail Use% Mounted on
devtmpfs                     24G     0   24G   0% /dev
tmpfs                        24G     0   24G   0% /dev/shm
tmpfs                        24G   27M   24G   1% /run
tmpfs                        24G     0   24G   0% /sys/fs/cgroup
/dev/mapper/almalinux-root   70G   19G   51G  28% /
/dev/sda1                  1014M  366M  649M  36% /boot
/dev/mapper/almalinux-home  1.5T  236G  1.3T  16% /home
tmpfs                       4.7G     0  4.7G   0% /run/user/0
[root@viking ~]#

Offline
*****
Re: What's going on?
« Reply #7 on: June 04, 2025, 03:01:53 AM »
This is probably related to the other issue that corrupted your server.

At this point, you might want to just wipe it and start over.

Offline
**
Re: What's going on?
« Reply #8 on: June 04, 2025, 04:54:25 AM »
If MariaDB is up and ready try:
service cwpsrv restart

Hey overseer, do you which file in CWP I need to edit the username and password for connecting to the mysql db? I know it's in those 2 files it asks me to check but what file is the one for cwp to access the root mysql db?

Offline
*****
Re: What's going on?
« Reply #9 on: June 04, 2025, 12:53:44 PM »
Can you log into mysql with root.   If so, please do the following.

cat /root/.my.cnf    Copy everything after password=

nano /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php

Change that password to the one you copied from .my.cnf

This should get your user panels up and running.

Offline
**
Re: What's going on?
« Reply #10 on: June 04, 2025, 05:17:30 PM »
Can you log into mysql with root.   If so, please do the following.

cat /root/.my.cnf    Copy everything after password=

nano /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php

Change that password to the one you copied from .my.cnf

This should get your user panels up and running.

I can only vnc in now, I get timed out errors now instead of 502 bad gateway when I try to reach the server but things are still running ok internally I guess because I keep getting emails of excessive pache use and monit started emails.