So I am a user of windows 10 and have xammp in my computer. When I first try to run MySQL server, had problem with 3306 port because I didn't had configured ports free. So I changed it to run on port 3307 and it worked.
After that I am trying to connect to localhost/phpmyadmin, and for a reason I just can't....
Anybody have any advice/idea what is going on ?
On the xampp config file : xampp\phpMyAdmin\config.inc:
ADD THIS LINE
$cfg['Servers'][$i]['port'] = '3307';]
(I just found the answer, so... I thought would be good to leave this here.. )
Related
This problem I am having trouble with, I have been looking at it for a few hours now. So basically I am working on a registration form on my website, and while working on the php, I connected it to MySQL and Database with this line of code (which is the 6th line of code):
$mysqli = new mysqli('localhost:8080', 'root', 'mypass123', 'accounts');
I use Xampp on a Mac and when I try to register it works just not fully so, the problem is it shows this error:
Warning: mysqli::__construct(): (HY000/2002): Connection refused in /opt/lampp/htdocs/form.php on line 6
if this is not enough information, I am sorry but I am new.
PHP expects to use port 3306 for MySQL. So you need to open XAMPP, and change the XAMPP MySQL port to 3306, then restart the MySQL server.
Stop Xampp
Open xampp/mysql/bin/my.ini
Edit MySQL port to 3306
Restart Xampp
I'd say that it's already set to 3306 so just check what it's currently set to and update the setting in your PHP/phpMyAdmin to 3306 instead of 8080. 8080 is generally for the web server.
I am currently using WAMP server on my Windows XP SP2 system. I just want to know why do I need to use localhost:8080 instead of just localhost to connect to my server-WAMP? I'm not that interested in this :8080 stuff.
So if you guys know why this happens, or how to exclude :8080 from the address, just help me through. Thank you very much by the way. Have a nice day.
Notice: Please don't tell me to switch to XAMPP. I know it works well.
This happens because your server is listening on port 8080, and not on port 80 which is the default (so when you type localhost you mean localhost:80).
So, you need to change your configuration to make WAMP listening on port 80. You find here how to do this: How to change port number for apache in WAMP.
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 just installed Xampp but when I tried to open http://localhost/phpmyadmin/ but an error message pops
The error message says
Error MySQL said: Documentation
2002 - No connection could be made because the target machine actively
refused it.The server is not responding (or the local server's socket is not correctly configured).
Connection for controluser as defined in your configuration failed.
Can someone help me out with this ?
The MySQL server isn't running, or you have a firewall blocking port 3306.
Else try this:
Add these lines in the host file
127.0.0.1 localhost # Additional IPv4 entry
::1 localhost # Existing IPv6 localhost entry
1-) Try to check your mysql 3306 port on your firewall maybe you can turn off and try again
2-) Did u configrated your mysql from xampp username, password etc correctly ?
3-) Did u start mysql service correctly witouht any non permissons from windows firewall or security software ?
4-) Could you give me more specific informations about your enviremoent at least os and verison of xampp ?
just start mysql on xampp control panel you should be good or further try freeing your port 3306 if all these still don't work, simply assign another port number for your mysqlserver but this should be your last resort though because I strongly believe starting your mysql on your control panel should fix this error. I have experienced it before.
I have wamp running fine with 2 virtual hosts. But after installation of vmaware wamp server not starting. Any idea about this problem? Or how can i figure what make wamp not starting, does it store its error log somewhere?
I am using widows 7.
Thanks
It is possible that WMWare uses the same port as WAMP. I remember Skype doing this resulting in APACHE being unable to start the servers on its port.
You can use this tutorial to try and change the vSphere port from it's 80 default:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1021199
LE: There could be some other WMWare component that uses the 80 port. Try closing all WMWare components and start WAMP. If it works, then WMWare is using the 80 port.
Most probably the 2 fight over the same port (80). Also, Skype might cause WAMP to fail at starting and to display "304" errors for every GET request on the server.
Change WAMP's listening port from \wamp\bin\apache\apache2.2.8\conf. Locate httpd.conf, open it with a text editor and search for listening. Change to whatever port you consider.