CyberPanel Community

(2003, 'Can\\'t connect to MySQL server on \\'127.0.0.1\\' (111 "Connection refused")')

ma
magnovasquez #1

OperationalError at /
(2003, ‘Can\‘t connect to MySQL server on \‘127.0.0.1\’ (111 “Connection refused”)’)
Request Method: GET
Request URL: https://x.x.x.x:8090/
Django Version: 1.11
Exception Type: OperationalError
Exception Value:
(2003, ‘Can\‘t connect to MySQL server on \‘127.0.0.1\’ (111 “Connection refused”)’)
Exception Location: /usr/lib64/python2.7/site-packages/MySQLdb/connections.py in init, line 193
Python Executable: /usr/local/CyberCP/bin/python
Python Version: 2.7.5
Python Path:
[’’,
‘/usr/local/CyberCP/bin’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP/lib64/python27.zip’,
‘/usr/local/CyberCP/lib64/python2.7’,
‘/usr/local/CyberCP/lib64/python2.7/plat-linux2’,
‘/usr/local/CyberCP/lib64/python2.7/lib-tk’,
‘/usr/local/CyberCP/lib64/python2.7/lib-old’,
‘/usr/local/CyberCP/lib64/python2.7/lib-dynload’,
‘/usr/lib64/python2.7’,
‘/usr/lib/python2.7’,
‘/usr/local/CyberCP/lib/python2.7/site-packages’,
‘/usr/lib64/python2.7/site-packages’,
‘/usr/lib/python2.7/site-packages’,
‘/usr/lib/python2.7/site-packages/gunicorn-19.9.0-py2.7.egg’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’,
‘/usr/local/CyberCP’]
Server time: Tue, 16 Apr 2019 17:01:09 +0000

I need your help guys, after updating my server (CentOS) i restarted and received the above message when i try to logging in the cyberpanel, other thing is that some sites are presenting DNS error and other are working but slow.

I checked the database to follow the process to reset the cyberpanel user in mysql but the user list do not show any cyberpanel user.

Help!

5 replies
Cy
CyberPanel #2

Your MySQL server is running?

ma
magnovasquez #3
Your MySQL server is running?

yeah:

[root@vmi193209 ~]# systemctl status mysql
● mysql.service - LSB: start and stop MariaDB
Loaded: loaded (/etc/rc.d/init.d/mysql; bad; vendor preset: disabled)
Active: active (running) since Tue 2019-04-16 12:01:08 AST; 1h 32min ago
Docs: man:systemd-sysv-generator(8)
Process: 29637 ExecStop=/etc/rc.d/init.d/mysql stop (code=exited, status=0/SUCCESS)
Process: 29899 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/mysql.service
├─30010 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/mysqld.pid
└─30190 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/my…

Apr 16 12:01:02 vmi193209.contaboserver.net systemd[1]: Starting LSB: start and stop MariaDB…
Apr 16 12:01:03 vmi193209.contaboserver.net mysql[29899]: Starting MariaDB.190416 12:01:03 mysqld_safe Logging to ‘/var/lib/mysql/mysqld.log’.
Apr 16 12:01:03 vmi193209.contaboserver.net mysql[29899]: 190416 12:01:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Apr 16 12:01:08 vmi193209.contaboserver.net mysql[29899]: … SUCCESS!
Apr 16 12:01:08 vmi193209.contaboserver.net systemd[1]: Started LSB: start and stop MariaDB.

Cy
CyberPanel #4
mv /usr/local/settings.py /usr/local/CyberCP/CyberCP/
systemctl restart lscpd
ma
magnovasquez #5
``` mv /usr/local/settings.py /usr/local/CyberCP/CyberCP/ systemctl restart lscpd ```

I don’t have a file under /usr/local/settings.py

ma
magnovasquez #6

Problem solved!

I have some misconfiguration applied by the recommendation in the cyberpanel platform with the mysql optimization options.

Replacing the file solve the problem.

Sign in to reply