Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
2.5k views
by
edited

Please advise, what do you think?

Everything used to work great, now things are broken. i already try to reboot vultr server too... no luck. wordpress site gives me "Error establishing a database connection" with error:

Warning: mysqli_real_connect(): (HY000/2002): Connection refused in /var/www/domain.com/htdocs/wp-includes/wp-db.php on line 1531

  • SSH > webinoly -verify > Integrity test passed!!
  • SSH > sudo log -mysql > Log file not found!!!
  • SSH > sudo webinoly -dbpass > credentials do not work, I get error "mysqli_real_connect(): (HY000/2002): Connection refused"
  • wp-config.php > define('DB_HOST', 'localhost'); > and I change localhost to 127.0.0.1:22222 but that does not work either
  • SSH > sudo webinoly -server-update > Nginx and PHP has been updated successfully!
  • wpconfig.php > define('WP_ALLOW_REPAIR', true); > unable to access page to repair database

Is PMA failing? If I purge or install new version of PMA, does the existing data deleted?

---

[SYSTEM]

Operating System: Linux version 4.15.0-20-generic (buildd@lgw01-amd64-039) (gcc                                                                                                                                                              version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2                                                                                                                                                             018

Description:    Ubuntu 18.04 LTS

Codename:       bionic

Cores: 1

RAM: 492952kb

SWAP: 0kb

File descriptors: 42989

[Disk Usage]

Filesystem     Type  Size  Used Avail Use% Mounted on

/dev/vda1      ext4   20G   14G  5.0G  74% /

[NGINX]

nginx version: nginx/1.14.0

Nginx file descriptors: 1024

worker_processes: auto

worker_connections: 8192

worker_rlimit_nofile: 100000

client_max_body_size: 100m

[CACHE]

FastCGI 200: 30d

FastCGI 3xx/4xx: 1m

FastCGI inactive: 7d

FastCGI max-size: 100m

open_file_cache_valid: 3m

open_file_cache max: 30000

open_file_cache inactive: 1m

[PHP]

PHP 7.2.7-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jun 22 2018 08:45:49) ( N                                                                                                                                                             TS )

memory_limit:  128M

post_max_size:  100M

upload_max_filesize:  100M

max_file_uploads:  20

max_execution_time:  300

[MYSQL]

mysql  Ver 15.1 Distrib 10.2.16-MariaDB, for debian-linux-gnu (x86_64) using rea                                                                                                                                                             dline 5.2

PhpMyAdmin: true

1 Answer

0 votes
by Expert

Hi Anonimous,

  • Do you know the difference between PMA and MySQL?
  • Seems like you are breaking a lot of things, port 22222 in wp_host makes no sense and it surely break your site.
  • Please, read Webinoly documentation, server-update command can break your server configuration if not properly used.
  • I don't know what is happening with your server, but the error your are getting is related with a MySQL misconfiguration. Did you manually change any conf value?
Regards.
by
Maybe I know the different, maybe not? PMA is a GUI (like Adminer) tool to access databases and makes it easy to run commands. MySQL is part of server stack that is used to store data in tables.

A few weeks ago, I installed a very simple, stock webinonly wordpress setup and the default port was 22222 and I never changed it. Any ideas? You recommend I change that right away?

No, I did not change anything.. really. I just used the Webinonly deployment to setup wordpress, SSL and add HTTP auth with SFTP access.
by
Everything magically works now, after another server reboot... I was able to log into PMA with the root credentials and even access WP Admin. I export database for backup, what else do you recommend?
by Expert

Ok, I'm glad everything is working fine now.

Two things to learn today:

  • Port 22222 is to access tools like PMA, so it makes no sense use it in your WP_HOST config. WordPress needs MySQL, no PMA access.
  • Your data is stored in MySQL, not in PMA. You will not lose your data if you remove PMA.
Best regards.
Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...