Menu Close
    Start a Project Request quote Reading list Switch to dark mode
    hyperlocal-marketplace-guide

    Disable ONLY_FULL_GROUP_BY in doctrine

    Anxious from getting an exception of ONLY_FULL_GROUP_BY with the Symfony project .?

    There is a best and simple solution if you want to get rid of this exception from a particular Symfony project, all you need to do is, you have to update the configuration of the doctrine.

    You need to add 1002 key inside the options key with the value ‘SET sql_mode=(SELECT REPLACE(@@sql_mode, “ONLY_FULL_GROUP_BY”, “”))’ under the dbal configuration.
    Like this:-

    That’s it. Now clear the cache if you’re having any trouble otherwise you’re ready to go.

    moreover, if you want to change this configuration globally (for all of the projects), you could either do it from MySQL console or from PHPMyAdmin.

    1:- From MySQL console

    2:- From phpmyadmin

    • Open phpmyadmin & select localhost
    • Click on menu Variables & scroll down for sql mode
    • Click on edit button to change the values & remove ONLY_FULL_GROUP_BY & click on save.

    I’ve explored this while contributing to Symfony based project UVdesk, there are a lot more things to learn and you could also contribute to an enterprise-level open source helpdesk.

    That’s how you could disable ONLY_FULL_GROUP_BY in doctrine.
    Thanks for reading me. I hope you’ll solve the issue with the help of this blog, please share your reviews on this, that will support me to write more.

    . . .

    Comments (6)

    Add Your Comment

  • Michael
    Sorry but this did not work for me.

    Error

    SQL query: Documentation

    SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,’ONLY_FULL_GROUP_BY’,”))

    MySQL said: Documentation
    #1227 – Access denied; you need (at least one of) the SUPER privilege(s) for this operation

    And this mean that i not have SUPER privileges as root to perform this action. I have followed this video,but at the end of video he type so fast,and his lines appear quickly,i did not see what he type. https://www.youtube.com/watch?v=O4AZSruTL7c&t=1s
    Can somebody help step by step?

    Thanks

  • Tabi
    Nice!!!! This saved me too! Thanks very much!
    • Shubham Mehrotra
      Thanks for commenting down your review. That will surely support me to write more <3
  • Tomek
    Thanks. You save my life
    • Shubham Mehrotra
      Hey Tomek,
      Happy to hear that I did for someone 😉

      Let me know if there is something else I could help you with. That will be a pleasure for me.

  • Back to Top
    css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again
    Close