mysqladmin flush-hosts

For users or potential users.
Post Reply
JLM
Posts: 128
Joined: Wed Dec 05, 2012 12:52 pm

mysqladmin flush-hosts

Post by JLM » Wed Apr 23, 2014 7:06 am

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

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: mysqladmin flush-hosts

Post by wjstarck » Wed Apr 23, 2014 7:37 am

Have you tried running the console as an administrator (Start > Right Click on Command Line > Run as administrator) then re-running that command?
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

JLM
Posts: 128
Joined: Wed Dec 05, 2012 12:52 pm

Re: mysqladmin flush-hosts

Post by JLM » Wed Apr 23, 2014 9:10 am

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

User avatar
Arna
Posts: 444
Joined: Tue Jul 09, 2013 3:16 pm

Re: mysqladmin flush-hosts

Post by Arna » Wed Apr 23, 2014 11:16 am

If you can access Open Dental on another workstation, you can flush hosts through a User Query.
Entropy isn't what it used to be...

Arna Meyer

JLM
Posts: 128
Joined: Wed Dec 05, 2012 12:52 pm

Re: mysqladmin flush-hosts

Post by JLM » Wed Apr 23, 2014 12:02 pm

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.

malay
Posts: 13
Joined: Thu Feb 18, 2021 8:00 am

Re: mysqladmin flush-hosts

Post by malay » Fri Feb 18, 2022 2:57 am

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?

agrasley
Posts: 15
Joined: Mon Jan 03, 2022 11:45 am

Re: mysqladmin flush-hosts

Post by agrasley » Wed Feb 23, 2022 8:02 am

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.
Alex Grasley
Open Dental Software
http://www.opendental.com

User avatar
jordansparks
Site Admin
Posts: 5739
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: mysqladmin flush-hosts

Post by jordansparks » Wed Feb 23, 2022 10:05 am

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.
Jordan Sparks, DMD
http://www.opendental.com

malay
Posts: 13
Joined: Thu Feb 18, 2021 8:00 am

Re: mysqladmin flush-hosts

Post by malay » Fri Apr 08, 2022 3:30 am

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.

Post Reply