View Full Version : Root locked out - Error 1226
lost
Oct 24th 2005, 11:47 am
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!!
frankm
Oct 24th 2005, 12:13 pm
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 command to check + repair broken tables/indices
good luck
blinxdk
Oct 24th 2005, 12:14 pm
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...
frankm
Oct 24th 2005, 12:17 pm
I take no responsibility if that corrupts your data...
that applies to my post as well :)
lost
Oct 24th 2005, 12:27 pm
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 24th 2005, 12:30 pm
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:
blinxdk
Oct 24th 2005, 12:37 pm
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.
lost
Oct 24th 2005, 4:29 pm
I didn't change it though...it was already at 100.
Its under Windows.
blinxdk
Oct 25th 2005, 12:16 am
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 :)
lost
Oct 25th 2005, 9:33 am
Tried the reboot, still nothing.
I ended up removing and installing MySQL...everything is fine and dandy.
Thanks for your help.
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.