0
I have an online server(Ubuntu) on which I have installed xampp. And then installed WordPress it has been almost 7 months everything was fine. Previously when I updated some post or added more number of post tags on WordPress the phpmyadmin crashes so I every time restart the xampp and everything worked fine.
But yesterday when I was updating a post on WordPress then the phpmyadmin again crashed but when this time I restarted xampp
When i start xampp it says
ubuntu@ip-xxx-xx-xx-xxx:$ sudo /opt/lampp/lampp start
Starting XAMPP for Linux 7.0.23-0...
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.
But nothing happened my wordpress site says "Error establishing a database connection" and when i visited the mysite.com/phpmyadmin and enter my phpmyadmin username and password it says:
#2002 - No such file or directory — The server is not responding (or the local server's socket is not correctly configured).
mysqli_real_connect(): (HY000/2002): No such file or directory
Connection for controluser as defined in your configuration failed.
mysqli_real_connect(): (HY000/2002): No such file or directory
All four error appears at once. My xampp installation directory is /opt/lampp
I have tried to add this line in config.inc.php of phpmyadmin but nothing happens
$cfg['Servers'][$i]['host'] = 'localhost';
OR
$cfg['Servers'][$i]['host'] = '127.0.0.1';
I have also checked /opt/lampp/etc/my.cnf it has socket location as socket = /opt/lampp/var/mysql/mysql.sock But i could not find any mysql.sock at this path also i searched for sudo find / -type s but did not find mysql.sock
error log:
configured -- resuming normal operations
[Thu Jul 11 22:46:36.013239 2019] [core:notice] [pid 4713] AH00094: Command line: '/opt/lampp/bin/httpd -E /opt/lampp/logs/error_log -D SSL -D PHP'
[Thu Jul 11 23:01:37.602242 2019] [mpm_prefork:notice] [pid 4713] AH00169: caught SIGTERM, shutting down
[Thu Jul 11 23:09:42.001635 2019] [ssl:warn] [pid 5286] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jul 11 23:09:42.001719 2019] [ssl:warn] [pid 5286] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jul 11 23:09:43.001695 2019] [ssl:warn] [pid 5287] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jul 11 23:09:43.001753 2019] [ssl:warn] [pid 5287] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jul 11 23:09:43.001843 2019] [lbmethod_heartbeat:notice] [pid 5287] AH02282: No slotmem from mod_heartmonitor
[Thu Jul 11 23:09:43.012733 2019] [mpm_prefork:notice] [pid 5287] AH00163: Apache/2.4.27 (Unix) OpenSSL/1.0.2l PHP/7.0.23 mod_perl/2.0.8-dev Perl/v5.16.3 configured -- resuming normal operations
[Thu Jul 11 23:09:43.012781 2019] [core:notice] [pid 5287] AH00094: Command line: '/opt/lampp/bin/httpd -E /opt/lampp/logs/error_log -D SSL -D PHP'
[Thu Jul 11 23:10:29.074354 2019] [mpm_prefork:notice] [pid 5287] AH00169: caught SIGTERM, shutting down
One more update when i changed the permission of /opt/lampp by
sudo chmod -R 777 /opt/lampp
after executing this line everything is working fine phpmyadmin is giving no error all but this permission is not safe I think there is something wrong with the file permissions only...
What is the solution to this problem please guide me thanks...
1Have you checked all the error logs? – DavidPostill – 2019-07-11T23:03:42.207