I install xampp server in vm and i accessed to it from another machine, for xampp server it work but i have this problem in phpmyadmin when i navigate to https://ip/phpmyadmin:
MySQL said: Documentation
#2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured)
i configure file config.inc.php and i change $cfg['Servers'][$i]['host'] = 'localhost'; localhost to my adress ip but it always same problem.
How can i fix it?
I want to have access remote to phpmyadmin.
Related
I have a little problem with my PhpMyAdmin (i use NGINX & PHP 7.2). I wanted to configure the SSL connection between MySQL (MariaDB 10.2.27) and PhpMyAdmin by adding its information to the config.inc.php file:
$cfg['Servers'][$i]['ssl'] = true;
$cfg['Servers'][$i]['ssl_key'] = '/etc/mysql/ssl/server-key.pem';
$cfg['Servers'][$i]['ssl_cert'] = '/etc/mysql/ssl/server-cert.pem';
$cfg['Servers'][$i]['ssl_ca'] = '/etc/mysql/ssl/ca-cert.pem';
$cfg['Servers'][$i]['ssl_ca_path'] = '/etc/mysql/ssl';
But now when I want to connect to PhpMyAdmin I get the error:
mysqli_real_connect(): (HY000/2006): MySQL server has gone away
Do you know why I have this error? Thank you in advance for your help.
You might be misunderstanding the ssl options in the pma config.
This does not encrypt traffic between your web browser and phpmyadmin, but rather the connection between phpmyadmin and your mysql server and it has to be set up on your mysql server.
AND you don't set an SSL certificate for phpMyAdmin for HTTPS - it is a web app - not a web server. Nginx stores the certificates and terminates/unwraps the SSL.
The HTTPS session you are using is between your PC and Nginx - it is nothing to do with phpMyAdmin. Your phpMyAdmin vhost is using whatever certificate you defined in Nginx.
HTTPS != SSL insofar as phpMyAdmin's configuration is concerned.
The setting you referred to is specifically for an SSL connection between phpMyAdmin and MySQL - which if is on localhost, isn't all too relevant anyway.
After all this question should goto : https://serverfault.com you are in wrong place.
See more : https://serverfault.com/questions/403006/phpmyadmin-with-ssl-https-and-mysql-client-on-nginx
I installed xampp in my pc(Linux endless os 3). Php is working fine but when I open my http://localhost/phpmyadmin in the browser it is displaying an error
2002 - No such file or directory — The server is not responding (or the local server's socket is not correctly configured).
Error is shown as below
Open the file config.inc.php in any text editor.
Find this line
$cfg['Servers'][$i]['host'] = 'localhost';
And change it to
$cfg['Servers'][$i]['host'] = 'localhost:3307';
I find this solution in this website http://throughthesql.blogspot.com/2017/05/configuring-phpmyadmin-to-connect-to.html
I can't access to PHPMyAdmin. when i want to go there, i got this error:
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
I googled this error but it don't clear.
I try to know that which port is open by this code :
pgrep mysql
two ports are open when mysql is running.
I want to access to PHPMyAdmin in my localhost. I am using Ubuntu OS
In Ubuntu, by default mysql is not listening to TCP/IP connections. It just uses a local socket.
The current local socket is configured in /etc/mysql/my.cnf . If you open this file, you should find something similar to:
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
What you should do is just to open PHPMyAdmin's config file (config.inc.php) and change the socket address. Maybe there's no local socket configuration on your PHPMyAdmin, or maybe it is different. This file should contain a line like (of course, adapt the address to what you found on my.cnf):
$cfg['Servers'][$i]['socket'] = '/var/run/mysqld/mysqld.sock';
Steps just to run the mysql server after crash.
** Worked on wamp server **
Check the {System name}.err file inside your mysql data directory.
From the log find out the databases causing issues
Cut them out from the data directory (keep in some safe places).
Start mysql service
go to C:\Windows\System32\drivers\etc edit host add 127.0.0.1 localhost
and restart server refrance check ans
This means that mysql server is not started.
This is very simply if you are using wamp left click the wampserver icon then mysql then services then install service after that restart wamp and the problem is solved
I'm following a book "Agile Web Application Development with Yii" and I am setting up a database connection to the Yii application through an application component.
I followed the books instructions and said the mysql db host is 127.0.0.1. I ran a test and it failed to connect.
Then I changed the host to "localhost" and it works.
Does anyone know why this is the case?
Check the file name host at this location
C:\WINDOWS\system32\drivers\etc
Check the default value of localhost in the host file, by default it should be 127.0.0.1 if not, change it to 127.0.0.1. Now try to access your wamp server by using 127.0.0.1 on any web browser.
Please refer this problem: Mysql localhost != 127.0.0.1?
Socket is used when localhost, while tcp/ip is used when 127.0.0.1.
website A: hosted on some free web host.
website B: my server
I want to connect from website B-(client) to mysql server of website A-(my server).
I've granted remote permission on mysql user with %.
But connection doesn't work. I've tried to run php script (mysql_connect) on different free web hosts.
000webhost.com : Can't connect to MySQL server on 'My SERVER IP' (4)
biz.nf : Lost connection to MySQL server during query
same script different mysql errors.
this php script run smoothly on my online SERVER, and also on localhost setup (connecting remotely to SERVER).
Is something else I've to configure on my SERVER?
I know that free web hosts doesn't allow remote mysql connection but in my situation I'm trying to connect with my own mysql server.
Does "remote mysql access" means both in and out connetion?
I've search a lot, something to do with ip-binding or port? I dont know where is actual problem?
Kindly help me out.
Tell mysql that it should listen on a fixed IP address, not 127.0.0.1 or localhost.
open file /etc/mysql/my.cnf (or /etc/my.cnf):
before
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
after
# INSERT YOUR IP Address here
bind-address = 192.168.45.1
#bind-address=127.0.0.1
Then restart your mysql server. HTH
Does your remote website's firewall allow external connections to the MySQL Port 3306?
Find this out to make sure you aren't spinning your tires