Page 1 of 1

mysqladmin flush-hosts

Posted: Wed Apr 23, 2014 7:06 am
by JLM
Grrr.....

Wierd situation. The mouse on a workstation went wild and launched opendental over a hundred times. Now, that workstation is banned from accessing mysql.

When you try to connect it says you have to issue the 'msqladmin flush-hosts' command.
So, I find the command line program in the program files directory on the server.
From the command window, if you type msqladmin.exe you get a help printout
If you type msqladmin.exe flush-hosts, it says, 'mysqladmin is not a valid program or batch file'.
Finally, if you type mysqladmin.exe "flush-hosts" it gives you a permission error.

How do I get past this and use that workstation again?

Jim Margarit

Re: mysqladmin flush-hosts

Posted: Wed Apr 23, 2014 7:37 am
by wjstarck
Have you tried running the console as an administrator (Start > Right Click on Command Line > Run as administrator) then re-running that command?

Re: mysqladmin flush-hosts

Posted: Wed Apr 23, 2014 9:10 am
by JLM
Good suggestion, but further googling indicates that I may have to also add "user=root password=???" to the command line. I think the ??? is actually blank. Too busy to try or interface with OD until the end of the day.

Jim

Re: mysqladmin flush-hosts

Posted: Wed Apr 23, 2014 11:16 am
by Arna
If you can access Open Dental on another workstation, you can flush hosts through a User Query.

Re: mysqladmin flush-hosts

Posted: Wed Apr 23, 2014 12:02 pm
by JLM
Arna wrote:If you can access Open Dental on another workstation, you can flush hosts through a User Query.
Well that was too simple!

In the unlikely case that anyone else has this issue.
Reports->userQuery
type 'flush hosts' in the box.
click submit.

Thanks!
Jim Margarit.

Re: mysqladmin flush-hosts

Posted: Fri Feb 18, 2022 2:57 am
by malay
I hope this still woks but I don't have access to another workstation or server directly.

Actually, in my case, I had not open / close OD multiple times. I was testing something with HL7.

If I don't access OD from this workstation for a few hours, will it unblock?

I also want to add, can someone tell me why exactly does this happen?

Re: mysqladmin flush-hosts

Posted: Wed Feb 23, 2022 8:02 am
by agrasley
MySQL has built in limits for connections and connection errors, when the number of concurrent connections matches the limit, or the number of connection errors matches the limit, then MySQL will refuse further connections. Using `flush hosts` will clear our those connections and connection errors. Anything that is trying to connect again, such as an open instance of Open Dental should still be able to connect back just fine and have no interruption, but new connections should then be allowed as the connections and connection errors have effectively been reset.

You can control the connection and connection error limit in the my.ini file. If you are unable to access MySQL on the command line, or access a running instance of Open Dental, another thing you can do is to restart your MySQL service. This will also block any access to the database while the service is restarting, so use caution if doing this during times you are working or seeing patients.

Re: mysqladmin flush-hosts

Posted: Wed Feb 23, 2022 10:05 am
by jordansparks
So when you were doing testing with HL7, I'm unclear if you were connecting directly to the db. If so, then you were probably the one who created all the extra connections. Instead, try to reuse the same connection.

Re: mysqladmin flush-hosts

Posted: Fri Apr 08, 2022 3:30 am
by malay
I am not directly connecting to the DB.

Maybe the case was the HL7 service was stopped for quite a few days and then it had a lot of work to do when it restarted. That caused the MySQL server to block the host.