Fueling Your Coding Mojo

Buckle up, fellow PHP enthusiast! We're loading up the rocket fuel for your coding adventures...

Popular Searches:

mysql - phpMyAdmin variable "sql mode" value ONLY_FULL_GROUP_BY lost when WampServer restarts

Hey everyone,

I'm facing an issue with WampServer and phpMyAdmin and hoping you could help me out.

So, every time I restart WampServer, the "sql mode" variable in phpMyAdmin is getting reset to its default value instead of retaining the custom value I had set previously. Specifically, I had set the "sql mode" to "ONLY_FULL_GROUP_BY" to enforce strict SQL mode and avoid any potential issues with GROUP BY queries.

However, for some reason, WampServer seems to be ignoring this custom setting and reverting back to the default value after every restart. This is quite frustrating as I have to manually set it each time, which is quite time-consuming.

I'm using WampServer for my local development environment, and I rely heavily on phpMyAdmin for my database operations. Hence, it is crucial for me to have the "sql mode" value set correctly and persist between server restarts.

Has anyone else experienced this issue? Is there a way to make WampServer retain the custom "sql mode" value for phpMyAdmin even after restarting the server? I appreciate any insights or suggestions you may have.

Thanks in advance!

All Replies



I encountered a similar issue with WampServer and phpMyAdmin where the "sql mode" value got reset every time I restarted the server. After some research and trial-and-error, I managed to find a workaround for this problem.

What worked for me was modifying the my.ini file in the WampServer installation directory. Here's what you can try:

1. Locate the my.ini file in the WampServer installation folder. In my case, it was located at "C:\wamp64\bin\mysql\mysql{version}\my.ini".

2. Open the my.ini file using a text editor like Notepad.

3. Look for the [mysqld] section in the file.

4. Add the following line under the [mysqld] section to set the desired sql mode:


5. Save the changes and restart WampServer.

By manually specifying the "sql-mode" in the my.ini file, it overrides the default settings and ensures that the custom value is retained even after server restarts.

Remember to adjust the file path and sql mode value based on your specific installation and requirements.

Give it a try and let us know if it works for you as well. If you have any other suggestions or solutions, feel free to share them too.

Good luck!


Hey there,

I totally understand the frustration and inconvenience caused by the resetting of the "sql mode" value in phpMyAdmin after restarting WampServer. I've also experienced a similar issue, but fortunately, I was able to find a solution that worked for me.

Instead of modifying the my.ini file, you can try configuring the "sql mode" directly within phpMyAdmin. Here's what you can do:

1. Open phpMyAdmin and navigate to the "Variables" tab.
2. Look for the "sql mode" variable in the list.
3. Click on the pencil icon or the "Edit" button next to the "sql mode" variable.
4. This will open a text field where you can enter your desired sql mode value, in this case, "ONLY_FULL_GROUP_BY".
5. Hit the "Go" or "Apply" button to save the changes.

By setting the "sql mode" directly within phpMyAdmin, it should now retain the custom value even after you restart WampServer.

I hope this solution works for you as well. If you have any other questions or need further assistance, feel free to ask. Don't forget to share your results!

Best of luck!


Hello everyone,

I encountered the same issue with WampServer and phpMyAdmin where the custom "sql mode" value would reset after restarting the server. After some troubleshooting, I managed to find an alternative solution that worked for me.

In my case, I discovered that the "sql mode" value was being overwritten by the WampServer template file during the restart. To address this, you can try the following steps:

1. Locate the template file named "my.ini" in the WampServer installation folder. It should be found at "C:\wamp64\bin\mysql\mysql{version}\my.ini".

2. Make a backup of the original "my.ini" file to ensure you can revert any changes if needed.

3. Open the "my.ini" file using a text editor.

4. Look for the section that begins with "[wampmysqld]". This is the template section that is applied upon server restart.

5. Within the "[wampmysqld]" section, add the following line to specify the desired "sql mode":


6. Save the changes to the "my.ini" file and restart WampServer.

By modifying the "my.ini" template file, WampServer will use the specified "sql mode" value each time the server restarts, ensuring it doesn't get overridden.

Give it a go and see if it resolves the issue for you. Remember to adapt the file path and sql mode value based on your specific setup.

Feel free to share any feedback or any other approaches that worked for you!

Best regards!

New to LearnPHP.org Community?

Join the community