MySQL Max_connections Error!

Discussion in 'Systems Administration' started by Shadow., Oct 30, 2017.

  1. electronicboy

    IRC Staff

    Because there is no way that we can provide step by step instructions around this, if you're having issues, you really need to consider hiring somebody who is capable of doing the work that you're not, when it comes to stuff like MySQL, failure to handle something properly can result in all of your data being lost, and who takes the blame on that?

    You also can't fix plugins leaking connections without fixing the code, and shamefully, there are too many plugins that use mysql improperly that this could actually be a real issue on your server.

    You have multiple issues here,

    1. Your MySQL permissions are clearly broken - to fix this, you really need to get somebody to do it for you who knows what they're doing, nobody sane is going to pass you instructions which could be potentially dangerous and expose your server to the world for everybody to do what they wish, or instructions that could easily see you losing potentially all of your setup.

    2. You more than likely have a plugin which is leaking connections if you're hitting that limit, or just have too many individual servers connecting to it, this needs to be looked into properly, once again, ideally by somebody who knows what they're doing.

    3. if you bumped up the setting in that file from the default and *restarted* the mysql server, and are STILL running out of connections, number 2 is really likey a major issue; that's over 6x the default.
  2. But how im supposed to do the " Number 3 " ?
  3. electronicboy

    IRC Staff

    Well, if you restarted the mysql server after making your changes, then you've "done" number 3, if you're still running out of connections, number 2 is a real major issue.
  4. the question is ... how to make the changes
    how to increase the max_connections
  5. Thats what i get when i try to change it from phpMyAdmin, even while im logged in with root upload_2017-11-2_14-12-49.png
  6. electronicboy

    IRC Staff

    see problem 1, your perms are clearly broken, and nobody is going to walk you through fixing whatever the heck you've done to break that.

    backup, and reinstall.

    but as I said, if you bump up the value in the config file and restart the mysql server, it should apply the changes. if not, you've likely done something wrong somewhere, but can't really see anything wrong with the config file snippet you've given, but that's not the full configuration that mysql uses... could be that you've set it somewhere else too or something, and that is overriding the value that you've set.
  7. from CLI connect to mysql daemon (server) with root user

    desc mysql.user;

    to see if
    Super_priv | enum('N','Y') | NO | | N

    (should be Y(es))

    If you grant all user blah blah.. you populate the user & database tables, defaulting the global privs to No.

    the same for:
    desc mysql.db;

    (when not set, Super_priv won't show, it should)

    What you can do is for example exit; and login as the db user that you're having issues with:
    and once logged in:

  8. only MySQL right ?
  9. how to fully delete all MySQL Files and configs ?
    then install it again and put my database back in it

    steps please :p <3
  10. electronicboy

    IRC Staff

    yes, which is another fun artifact of "if you do it wrong, you lose all of your data", which is why it's in my interest to not provide step by step instructions for it.
  11. i sent you my full mysql file in a pm
  12. upload_2017-11-2_14-59-33.png

    check what i get when i do your commands :p
  13. upload_2017-11-2_15-0-34.png
    it say i have * but ... i think its somehow broken
  14. no i know how to backup my database, so don't worry about losing it
    but i just want to know how to delete everything for mysql
    to not keep the same problem
    and be able to fix the max_connections problem
  15. There's a lot that's not happening in that screenshot that it should show..
  16. To confirm, this is a VPS and you have full access to it?
    This isn't a shared hosting solution, right.

    Which distribution / version of linux is it running?
  17. Explain more please
  18. Didn't need proof, there's just so many threads about hosting it's hard to remember the details of them all.
    Glad to hear it's a vps and you have proper access to it. Erhm. And it seems you're on Ubuntu 16.x LTS. Great!

    here are some q/a from digital ocean's faq/support pages about mysql management;

    and to install it from scratch after it's been removed

    note: if you want to keep your mysql database data, export it first.
    (also shows you how to reset the mysql root pass)

    oh btw, feel free to remove the screenshots from your posts so you dont disclose customer number details or other personal info
  19. He already has the right commands, he's getting an missing SUPER permission error upon executing.