1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.
  2. Better Analytics for WordPress Get It Free

Root locked out - Error 1226

Discussion in 'MySQL' started by lost, Oct 24, 2005.

  1. #1
    I accidently changed the 'max connections' resource in the MySQL admin section to be '1' instead of 0, which means i've locked myself out through the GUI.
    Can someone please help me change it through the command line or any other way!!
     
    lost, Oct 24, 2005 IP
  2. frankm

    frankm Active Member

    Messages:
    915
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    83
    #2
    try shutting down your apache server - that will free the 1 possible connection :) then wait a while for all "WAITING FOR .." threads to complete and try to login again and shut the mysql server down.

    If that still doesnt work, alter the my.cnf file to accept multiple connection again and kill the mysql server the hard way (kill <pid>). When you re-started the mysql daemon, run a
    mysqlcheck -A -r
    Code (markup):
    command to check + repair broken tables/indices

    good luck
     
    frankm, Oct 24, 2005 IP
  3. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Edit /etc/my.cnf or /etc/mysql/my.cnf or equivilant.

    Change/insert max_connections = xxx, then reload mysql (that might be enough too).

    You might have trouble reloading mysql as that proberly uses mysqladmin and a connection, so a last way out is to kill the mysql server and then restart.

    I take no responsibility if that corrupts your data...
     
    blinxdk, Oct 24, 2005 IP
  4. frankm

    frankm Active Member

    Messages:
    915
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    83
    #4
    that applies to my post as well :)
     
    frankm, Oct 24, 2005 IP
  5. lost

    lost Peon

    Messages:
    144
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks guys, but shutting down the apache server along with the mysql server doesn't work????

    Also, i can't find a file /etc/my.cnf or equivalent.

    I can't access the command line either.
     
    lost, Oct 24, 2005 IP
  6. lost

    lost Peon

    Messages:
    144
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I'm not sure if the 'my.ini' file is an equivalent, but i did check in there and there is a line for max_connections...the weird thing is that its set to 100!!
    i'm soo confused :confused:
     
    lost, Oct 24, 2005 IP
  7. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Well you changed the variable for the running server, so it will not be adjusted before you reload the mysql server. Is this Windows or Linux or?

    Under Linux a kill -HUP <pid> might do the trick - not 100% sure.
     
    blinxdk, Oct 24, 2005 IP
  8. lost

    lost Peon

    Messages:
    144
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I didn't change it though...it was already at 100.
    Its under Windows.
     
    lost, Oct 24, 2005 IP
  9. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #9
    hmm.. I don't really know anything about windows - if it's running as a service, maybe you can restart that? Else I hear the fix to everything under windows is a reboot :)
     
    blinxdk, Oct 25, 2005 IP
  10. lost

    lost Peon

    Messages:
    144
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Tried the reboot, still nothing.
    I ended up removing and installing MySQL...everything is fine and dandy.

    Thanks for your help.
     
    lost, Oct 25, 2005 IP