I need your help to resolve the below issue.
I have installed XAMPP server on a virtual machine having Windows 10. I changed the ports from 80 to 8080 and MySQL from 3306 to 3307. Still, I am getting an error when I try to access phpMyAdmin using localhost
Did you also change the phpmyadmin configuration to use the new port?
If not do it with the following steps:
Open the xampp controlpanel
click config behind apache -> then click phpMyAdmin
search for the line $cfg['Servers'][$i]['host'] = '127.0.0.1'; and add $cfg['Servers'][$i]['port'] = 'your new port number'; under it
save the file
Related
I've installed WAMP Server on Windows 10 and it was working fine. But when I try to load localhost today it gives me refused to connect error. I've read some questions on Stack Overflow and tried their answers but no luck.
Re-installed wamp (also tried xampp. non of these work)
IIS is off
Web Development.. thing in services is not running.
Tried netstat -aon and port 80 PID is same as wampapache64 process.
changed listening port to 81 in httpd.conf in wamp => apache =>
Cleared browser cache
Wamp icon is green
Can't connect using 127.0.0.1
Nothing works.
Screenshots:
I will assume the wamp icon in the system tray is green. I think you should start tracing the root cause from the apache error/access log.
Try change the http port to 8080 and access localhost:8080. left click the wamp icon in the taskbar, go to apache > httpd.conf and edit this file: change "listen to port .. 80" to 8080.
Try the hosts file with only the initial records and test.
127.0.0.1 localhost
::1 localhost
If you are facing the error from the apache errors log file
(OS 10038)An operation was attempted on something that is not a socket. : AH00332: winnt_accept: getsockname error on listening socket, is IPv6 available?
then do the following:
* Run 'command prompt' as administrator and run the command netsh winsock reset . and restart the PC.
Skype default port is 80 and this might be having a conflict .. try to change it from Skype options.
Finally make sure the antivirus or any firewall you are having is not blocking your application requests.
firstly, uninstall wampp as well as xampp server from your PC. Also delete the wampp/xampp folders in C drive.
then install wampserver 2.0i from the link below-
wampserver 2.0i
after installation, start wamppserver and try to open localhost in chrome browser.
if localhost doesnt work, then try localhost:80
hope it helps!!
I have tried to resolve, error on how to start mysql service on xampp.
I tried disabling the port on skype
What should I need to do to start MySQL using Xampp. Thanks in advance for the reply
This happens when you have something running on port 80, like skype. You can either stop the service running on that port or open httpd.conf (in your XAMPP directory) and change the port to something else, change the following line
Listen 80
to
Listen 8080
The correct answer was
To stop the apache2 service in XAMPP control panel.
by carton
I have installed the latest XAMPP with MySQL version 14.14 Distrib 5.6.21, the problem is in my computer, I already have a MySQL database installed by other program that I am using.
So I configure the XAMPP MySQL port to 3307 (default is 3306) inside the my.ini file. However, now my localhost/phpmyadmin seems to read the database installed by the other program, not the one in XAMPP, and also when I test using some PHP files, it shows that I am connected to the database even though XAMPP is turned off (XAMPP MySQL also disconnected).
How do I change the setting of my PHPMyAdmin and localhost to connect to the MySQL port 3307?
I don't understand how all these ports and the database work.
Goto xampp>phpMyAdmin Directory.
Find the config.inc.php file.
Now change this line:
$cfg['Servers'][$i]['host'] = '127.0.0.1';
To
$cfg['Servers'][$i]['host'] = '127.0.0.1:3307';
To configure phpMyAdmin to connect to a different port from the default, edit your config.inc.php file and add a line like:
$cfg['Servers'][$i]['port'] = '3307';
(of course substituting any port number as needed). You can also see the official documentation.
First open the following path:
C:\xampp\phpMyAdmin
Add the following string in config.inc.php file.
$cfg['Servers'][$i]['port'] = '3307';
The following worked for me, I just added my port code to:
$cfg['Servers'][$i]['host'] = '127.0.0.1:3308';
Add below line under phpMyAdmin/config.inc.php
$cfg['Servers'][$i]['port'] = port number;
in my case the port number is 8111.
I have servers :
a Sql server
a VPS
I installed apache on my debian server.
I want to access my SQL server through PDO.
But an error occurs :
SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'my_sql_server_ip' (110)'
However, I can access my SQL server from local apache server (MAMP).
So I think the problem is client side.
Any suggestion ?
On MAMP , click File Menu > Edit Template > MySQL my.cnf
and change bind-address = 127.0.0.1 by bind-address = 0.0.0.0
(don't edit directly /Applications/MAMP/tmp/mysql/my.cnf because MAMP will overwrite the file on restart)
I am trying to run the no-install version of MySQL on Windows XP located in C:/mysql/ on my machine.
The error message I receive within a PHP file when I try to connect to MySQL reads.
Could not connect: No connection could be made because the target machine actively refused it
I have edited the config file my.ini and altered/added the following.
[client]
port = 3306
socket = C:/mysql/tmp/mysql.sock
[mysqld]
port = 3306
socket = C:/mysql/tmp/mysql.sock
basedir = C:/mysql/
datadir = C:/mysql/data/
bind-address = 127.0.0.1
skip-networking
enable-named-pipe
When I run mysqld.exe I can confirm it is running within command prompt tasklist.
However when I try cmd netstat -a I cannot see any port usage at 3306.
Inside MySQL error logs, it reads.
140411 13:30:34 [Note] c:\mysql\bin\mysqld.exe: ready for connections.
Version: '5.5.37-log' socket: '' port: 0 MySQL Community Server (GPL)
The port: 0 doesn't look correct to me, but I am not sure.
When I run mysql.exe direct in cmd I get the following returned
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
Some things I have tried already.
Placing a copy of my.ini in C:/WINDOWS and also a copy within C:/mysql
Changing bind-address = 127.0.0.1 to bind-address =
localhost
Inside PHP file MySQL connection variants, localhost, 127.0.0.1, 127.0.0.1:3306 inside basic mysql_connect()
Created tmp/mysql.sock file (in case dir + file not existing matters)
Commented out skip-networking in my.ini
After running mysqld.exe whilst running ran mysqladmin.exe in cmd which returns 'Can't connect to MySQL server at 'localhost'
Running telnet localhost 3306 returns
'Connecting To localhost...Could not open connection to the host, on port 3306: C
onnect failed'
Commented out bind-address in my.ini to allow default settings.
Ran mysqld.exe with user root (-u root) also inserted user = root in my.ini
Set Windows Firewall to off.
Thanks in advance.
Ok. You have binded your server to specific ip so please read this MySQL bind-addres. Please unbind your server and check if you have proper user. (last paragraph in documentation)