Couldn't make connection to MySQL after SQL_MODE is set - wamp

I am using wampserver 2.5, I have to change some configuration of my.ini
I added these lines in my.ini file.
[mysqld]
SQL_MODE = "NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
After adding these lines and restarting my wamp, I could not make connection with MySQL and the color of wamp icon is also orange.
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).

Related

Changing Wamp Server MySQL and mariadb port and Projects link for index.php

Changing Wamp Server MySQL and MariaDB port ?
Wamp Server version: 3.2.0
mariadb port=3306
mysql port=3308
image description here
wamp server icon right mouse click->Tools->(MariaDb) Use a port other than->3307 ok
wamp server icon right mouse click->Tools->(Mysql) Use a port other than->3306 ok
restart wamp server...
enter image description here
Projects link for index.php ?
enter image description here
index.php line:346
$projectContents .= '<li>'.$file.'</li>';
convert
$projectContents .= '<li> <a href="'.$file.'" >'.$file.'</a></li>';
Update Wamp Server version: 3.3.0
index.php line:547
... : '<li>'.$file.'</li>';
convert
... : '<li><a href="'.$file.'" >'.$file.'</a></li>';
There's a solution that just requires right-clicking on the WAMP icon, go to "Tools" and click on "Invert default DBMS MariaDB <-> MySQL", that should work. It will set MySQL as a default engine, change the port numbers for you and restart the services all by itself.
It is more efficient than the one you provided because the port number 3306 in WAMP Server is now reserved for the default MariaDB in all newer installations starting from v3.2.0. Therefore, you can no longer change the port number by selecting "Use a port other than xxxx" and you will get an error message. Even re-writing the .ini files doesn't get the job done, save the procedure I explained above.

Connecting to Could SQL from local machine via proxy

I am following these instructions to deploy a Django app on Google App Engine:
https://cloud.google.com/python/django/appengine
I have got as far as downloading the proxy .exe file (I am on a Windows machine) and connecting to it:
2019/01/08 16:14:08 Listening on 127.0.0.1:3306 for
[INSTANCE-NAME] 2019/01/08 16:14:08
Ready for new connections
When I try and create the Django migrations by running python manage.py createmigrations I see the connection received by the proxy file:
2019/01/08 16:15:06 New connection for
"[INSTANCE-NAME]"
However, after a couple of seconds pause I get this error:
2019/01/08 16:15:28 couldn't connect to
"[INSTANCE-NAME]": dial tcp
35.205.185.133:3307: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
I have tried disabling my local firewall in case this was causing any issues, but the result is the same. I've also checked the username, password and Cloud SQL instance name, they are all correct.
What could be causing this error?

WAMP Server - local server - 1 of 2 services running

I installed WAMP server and ran the applpication. The icon in the taskbar stays orange and says "local server - 1 of 2 services running" . Also, I am able to see the phpMyAdmin page in the browser but when I try to login it gives the following error:
#2002 - No connection could be made because the target machine actively refused it. <br />The server is not responding (or the local server's socket is not correctly configured).
I have tested port 80 and I got this response:
***** Test which uses port 80 *****
===== Tested by command netstat filtered on port 80 =====
Test for TCP
Your port 80 is used by a processus with PID = 6612
The processus of PID 6612 is 'httpd.exe' Session: Services
The service of PID 6612 for 'httpd.exe' is 'wampapache64'
This service is from Wampserver - It is correct
Test for TCPv6
Your port 80 is used by a processus with PID = 6612
The processus of PID 6612 is 'httpd.exe' Session: Services
The service of PID 6612 for 'httpd.exe' is 'wampapache64'
This service is from Wampserver - It is correct
===== Tested by attempting to open a socket on port 80 =====
Your port 80 is actually used by :
Server: Apache/2.4.18 (Win64) PHP/5.6.19
I believe that the above result means that there is no problem with the port. I even tried changing the port and still gives the same status - orange icon.
Note - When a prompt from Windows Firewall was shown after installing WAMP, I didn't give access to both private and public networks, i.e. I unchecked both the options.
Kindly help me to run both the services in the local server.
Thank you!
Click on the WAMP icon in the tray and go to Apache > service Administration and check if the service is installed or if it isn't running . You can even reinstall it by removing and installing it again. Do the same with MySQL . Go to MySQL > Service Administration and do the same things . In my case Apache service wasn't installed and Installing it did the trick. check the image below.
See this image
Most of the answers given on the Internet say to change the port used by Apache but that is not the solution in most of the cases.
Actually, start the WAMP server->right click on the icon -> tools -> use a port other than 3306 -> click on this -> set on 3308.
Hopefully, this will resolve the error.
I had the same problem but only Skype was using port 80. I just changed port 80 from Skype and make it use another one. OR you can change port 80 used by Apache. To do this go to WAMP -> Apache -> http.conf and change Listen 80 with Listen 81 for eg.
The same with me but in my case I installed mysql after installing wampserver so there was a port conflict between the integrated version and the independent version of mysql for the port 3306, so the problem could resolved either by changing one of ports
If you want to change wampserver's mysql's port go to the taskbar icon right click and the go to tools select: use a port rather than xxxx(3306 in my case)
This thread helped me.
How to change port number for apache in WAMP
Thread Details below
Just go to httpd.conf file, for ex. under WAMP environment its situated at:
C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf
go to line no. 46 and edit Listen 80 to your requirement for ex.
Listen 8383
newer versions of WAMP uses these 2 lines:
Listen 0.0.0.0:8383
Listen [::0]:8383
Next go to line no. 171 and edit ServerName localhost:80 to your requirement for ex.
ServerName localhost:8383
Restart Apache and its done !!
Now, you can access with your URL:
http://localhost:8383 or http://192.168.1.1:8383
Hope it helps to people looking for solution here.
No need to remove and reinstall WAMP or edit Host file or change any port. this problem happens when Internet Information Services (IIS) Manager service is running. you need just stop IIS to run wampapache service without any problem.
press start then type iis and run Internet Information Services (IIS) Manager and in right panel press stop. then click on wamp icon on system tray and choose start all services.
this is all you need.
I had the same issue some time back. Tried all kinds of things and finally found the link below. Basically the issue was:
A parameter in your 'my.ini' file (C:\Wamp\bin\mysql\mysql<version>) called 'lower_case_table_names'
If there, comment it out and restart MYSQL again."
If I recall, also did a computer restart also just for good measures.
http://forum.wampserver.com/read.php?2,136457
This might be because php is not working because the default port 80 is taken so u need to change the port follow these steps
1. Click the wamp icon from the bottom right corner
2. Go to Apache->httpd.conf and open this file
3. Search for word Listen in the file and change these two lines
Listen 0.0.0.0:8018 (u can use any digits instead of 18 )
Listen [::0]:8018
4. Now search for the word localhost and change this line
ServerName localhost:8018
5. Restart wamp
6. Go to your default browser and type http://localhost:8080/ this will open the wamp menu
It's either your WAMP Apache port is clashing with IIS (if that is installed and running), or MySQL port is clashing with another MySQL install.
Edit your WAMP > Apache > httpd.conf by hovering cursor over Apache inside WAMP tray icon. Change port 80 to an available port like 8181. Restart all services.
I had the same issue, where only 1 service out of 2 was running. But my issue was not a port issue.
I had previously zipped up a bunch of .conf files in the alias directory to share them with a colleague, and I left the .zip file there. This caused an error in Apache as it tried to use the .zip file as an alias.
Once I removed the .zip file from the alias directory, my Apache services were working fine.
Bit of an 'outside the box' answer, but this was my issue with the same symptoms!
Maybe it is not a port problem.
if you had a problem because msvcr110.dll is missing
so after you setup the library you will get this problem service 1 of 2
so in this case you have to reinstall the wamp server.
I had faced similar similar issue where the server was not starting up with the following message - "local server - 1 of 2 services running" , with server icon in Orange color.
With nothing updated in the error logs. Finally was able to track issue through -
Wamp server icon -> Apache -> Service Administration 'wampapache64' -> install service
Error message : WAMP - 'Your port 80 is actually used - Error'
Resolution : Change the port number of the wamp server to some other number,for example 5050.
Go to: C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf
In that file change the listen port to 5050.
#Listen 12.34.56.78:5050
Listen 0.0.0.0:5050
Listen [::0]:5050
Save and Restart. Now you can see the server started successfully with green icon.
Following threads helped me to resolve this issue :
How to change port number for apache in WAMP
WAMP - Your port 80 is actually used - Error
GO to run type Services and enter
check these two services must start

Installing and Viewing Neo4j on Existing AWS EC2 Instance

I'm trying to install the enterprise edition of neo4j on an existing EC2 (Amazon linux) instance. So far I've
wget "link to enterprise"
untar the file
renamed and moved the folder to NEO4J_HOME
then went into the config files for neo4j.properties to make the following changes:
# Enable shell server so that remote clients can connect via Neo4j shell.
remote_shell_enabled=true
# The network interface IP the shell will listen on (use 0.0.0 for all interfaces)
remote_shell_host=127.0.0.1
# The port the shell will listen on, default is 1337
remote_shell_port=1337
EDITED Christophe Willemsen pointed out that for my original error, I had forgotten to restart the server at that point but I was still unable to access the web server while it was running. So to make it more clear, I've edited the remaining post:
I went to neo4j-server.properties and uncommented:
org.neo4j.server.webserver.address=0.0.0.0
And start the server
NEO4J_HOME/bin/neo4j start
WARNING: Max 1024 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow
Starting Neo4j Server...WARNING: not changing user
process [28557]... waiting for server to be ready..... OK.
http://localhost:7474/ is ready.
checking the status:
NEO4J_HOME/bin/neo4j status
Neo4j Server is running at pid 28557
I can run the shell but the when I go to localhost 7474 I still can not connect
Any help would be appreciative. The only tutorial or help I've found assumed I was starting from scratch with a new instance. If someone could provide some instructions for installing or fix my configuration that would be great.
Thanks!
You have to edit neo4j-server.properties and uncomment the line with:
org.neo4j.server.webserver.address=0.0.0.0
So that the db listens on an external interface not just localhost, and you have to open the port (7474) in your firewall rules.
Make sure to secure access to the db though:
http://neo4j.com/docs/stable/security-server.html

trouble on wamp server after fresh installation

I have a newly installed wamp server. Actually i reinstalled it because
i was having problem with it previously. It was not starting anymore (offline, icon stays yellow). I reinstalled it hoping it would go back to normal. i have two servers running
on the server pc (sql server and wamp server).
sql server is listening in port 80 and wamp server is listening at port 8000. This was working fine before i tried to add a new extension to the php server (php_mssql.dll).
now, on my newly installed wamp, im still having the same problem, the icon on the system tray
remains yellow. It does not go online. what seems to be the problem here?
Make sure that port 8080 is empty .if you have installed skype any other software ,antivirus then first uninstall them and restart wamp server the wamp server it will turn in green
cause to wamp server stays yellow: port 8080 is not empty