Control Web Panel
WebPanel => Information => Topic started by: Dragan on April 30, 2019, 09:42:13 PM
-
Hello,
I have a problem logging on to the server.
This is a mistake.
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 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:
When try restart MySQL server:
service mysqld restart
Redirecting to /bin/systemctl restart mysqld.service
Failed to restart mysqld.service: Unit not found
Can you help me, please ?
-
Not a good error. Looks like your MySQL/MariaDB server has been removed. Without seeing the server in more detail it's hard to say what has happened or how. I expect you added a custom repo and it's wreaked havoc during an automated update.
You could try "yum install mariadb-server" and seeing what happens. It'd be unusual for your /var/lib/mysql data directory to be touched or removed, so you hopefully haven't lost anything. Nonetheless, this is a serious error and I do hope you have backups.
If you're seeing this error right away after a brand new CWP installation, reload the OS from scratch.
-
I installed MariaDB and now this is a new mistake.
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 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:
-
Okay, so it looks like you've actually lost your MySQL data somehow. Something or someone has uninstalled MySQL/MariaDB, then reinstalled it and ran the mysql_secure_installation wizard. The chances of you getting any of your data back are very slim. You should bring in a sysadmin at this point if you want to try recovering anything.
To be perfectly honest, this is the time you should either restore back to a time when this wasn't a problem, or spin up a new server and migrate your sites to it. Trying to fix this when somebody/something has been playing with the OS is never going to end well.
-
it seems that the data is not lost is only the problem is to connect MySQL and db_conn.php
in /var/lib/mysql have all.
now my sites are working only I can not log in CWP panel.
https://mdentity.app/index.php/signin working.
Is there any script that fixes MySQL passwords?
-
I'm not even going to bother here, wasting my keystrokes.
Good luck with your broken server.
-
1) You must restart mariadb server with the mariadb unit.
The command is:
(for CentOS7):
# systemctl restart mariadb
or
(for CentOS6):
# service mariadb restart
2) ** 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.
Regards,
Netino
-
Password in /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php is the same as in /root/.my.cnf, I checked.
When I try sh /scripts/mysql_pwd_reset
Error is:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")
Cleaning up...
Stopping mysqld (via systemctl): [ OK ]
mysqld: no process found
Starting mysqld (via systemctl): [ OK ]
ERROR! MariaDB is not running
service mariadb status shows mariadb working.
-
I solved the problem.
Thank you all.
Now everything works.
-
I solved the problem.
Thank you all.
Now everything works.
Thanks for sharing the answer >:(
-
I'm insulting because I did not come to explain what was the problem.
I solved the problem by installing MariaDB again.
In /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php and /root/.my.cnf I put in the password that was in the beginning (I took a picture on the phone before I changed anything.)
MySQL database password and password used for encryptions is not they were not properly tuned.
Someone deinstalled MariaDB and it made all the trouble.
If you have this problem, first just try to Install MariaDB.
-
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 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:
[root@host ~]# /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
-bash: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php: Permission denied
[root@host ~]# /root/.my.cnf
-bash: /root/.my.cnf: Permission denied
-
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 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:
[root@host ~]# /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
-bash: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php: Permission denied
[root@host ~]# /root/.my.cnf
-bash: /root/.my.cnf: Permission denied
same problem i think it cwp new version omg
-
Hi, what exactly you trying with the things below?
[root@host ~]# /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
-bash: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php: Permission denied
[root@host ~]# /root/.my.cnf
-bash: /root/.my.cnf: Permission denied
Just run the command:
/scripts/mysql_pwd_reset
-
Hello
I have the same issue and resolve it without change password
go to
/etc/my.cnf
you will find it like :
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
[mysqld]
performance-schema=0
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 1028M
sort_buffer_size = 200M
read_rnd_buffer_size = 20M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
innodb_buffer_pool_size=25165824
max_allowed_packet=268435456
open_files_limit=100000
innodb_file_per_table=1
remove it and use this
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
after that restart all cwp service
sh /scripts/restart_cwpsrv
I hope this it will help you.
-
Are you serious? NEVER delete anything you do not understand!
I hope everybody understands you kidding
-
One can try "yum install mariadb-server" and see what happens. Your database is affected or deleted by / var / lib / mysql, so we hope you didn't miss anything. Anyway, it was a big mistake and I hope you get your backup.
-
/etc/systemd/system/mariadb.service.d
`-migrated-from-my.cnf-settings.conf
Active: activating (start) since Thu 2020-11-12 02:42:09 EST; 173ms ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Process: 17985 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
Process: 17982 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 17996 ((mariadbd))
CGroup: /system.slice/mariadb.service
`-17996 (mar
-
/etc/systemd/system/mariadb.service.d
`-migrated-from-my.cnf-settings.conf
Active: activating (start) since Thu 2020-11-12 02:42:09 EST; 173ms ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Process: 17985 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
Process: 17982 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 17996 ((mariadbd))
CGroup: /system.slice/mariadb.service
`-17996 (mar
And what do you think we can see there? :D
-
And what do you think we can see there? :D
LOL ;D
Someone who doesn't wrap code in tags, is the only error that I can spot. ;)
-
@cynique do not advise if you do not understand what are you talking about!
-
Igor S.
You are normally one of the better ones here - you're beginning to sound like one of the other members of the Team. :(
I was actually complimenting you, on your reply.
-
i checked my passwords and there the same?
1) You must restart mariadb server with the mariadb unit.
The command is:
(for CentOS7):
# systemctl restart mariadb
or
(for CentOS6):
# service mariadb restart
2) ** 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.
Regards,
Netino
-
> i checked my passwords and there the same?
Then check if you are able to connect as root to MySQL with the password.
Make sure you have enough disk space also.
-
I solved the problem.
Thank you all.
Now everything works.
Can you tell me how you solved the problem ?
-
I am getting the issue today and mariadb is not starting, upon investigating the issue I was getting mariadb corrupt table, so I insert
innodb_force_recovery = 5
into the my.cnf file. what it did was, all my site are up.
but now, I am getting issue with cwp admin login. so I reset the mysql root password, it was successfully reset, and also change the root password, but still getting the above message
-
when I insert
innodb_force_recovery = 5
in configuration file of mysql, all the websites get up and databases get up, but cwp admin panel login doesn't work after that and getting error.
-
You need to get mariadb fully functional before CWP will function properly. You may need to repair your tables, delete your log files (ib_logfile0 and ib_logfile1), or roll back to a backup (or recreate the root_cwp database) in order to get fully stabilized.