Toad World® Forums

Error while trying to connect to MongoDB

When I try to connect the MongoDB database from: Navigation Manager/Create new connection, I get the error: "Incorrect key file for table '. \ Mysql \ proc'; try to repair it" and the only possible option is to close the application.

And I couldn't even put MongoDB credentials for this connection

What I should in this situation?

Below some additional information from shutdown window:
MySQL Exception
Incorrect key file for table '.\mysql\proc'; try to repair it
Server stack trace:
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at Quest.Toad.Db.ProxyCommand.ExecuteReader(CommandBehavior behavior)

Exception rethrown at [0]:
at Quest.Toad.Util.Global.RethrowKeepingStackTrace(Exception e)
at Quest.Toad.Db.ProxyCommand.ExecuteReader(CommandBehavior behavior)
at Quest.Toad.Db.Connection.Query(ConnectionType type, CommandBehavior behavior, String sql, Object parameter)
at Quest.Toad.CloudDB.CloudDBConnection.IsUserWindowsAuthAccount(String username)
at Quest.Toad.CloudDB.CloudDBConnection.DoAfterConnect()
at Quest.Toad.Db.Connection.Connect(Boolean notify)
at Quest.Toad.Db.Provider.CreateConnection(ConnectMediator connOptions, OpenConnectSettings openConnectSettings)
at Quest.Toad.ConnectionManager.ConnectionFacade.NewConnection(ConnectMediator connectOptions, Boolean promptUIToConnectIfNeed, Nullable1 nbCreateDocumentsOnNewConnection, Nullable1 nbAddToGlobalConnectionList, Boolean bUseBackgroundConnector, ConnectionCreatedHandler onEndHandler, Nullable`1 secondRun)

Exception rethrown at [1]:
at Quest.Toad.Util.Global.RethrowKeepingStackTrace(Exception e)
at Quest.Toad.ConnectionManager.ConnectionFacade.NewConnection(ConnectMediator connectOptions, Boolean promptUIToConnectIfNeed, Nullable1 nbCreateDocumentsOnNewConnection, Nullable1 nbAddToGlobalConnectionList, Boolean bUseBackgroundConnector, ConnectionCreatedHandler onEndHandler, Nullable1 secondRun) at Quest.Toad.ConnectionManager.ConnectionFacade.GetConnection(ConnectMediator connectOptions, Boolean& isInGlobalConnectionList, Boolean promptUIToConnectIfNeed, Nullable1 nbCreateDocumentsOnNewConnection, Boolean bUseBackgroundConnector, ConnectionCreatedHandler onEndHandler)
at Quest.Toad.CloudDB.CloudDBConnectionControl.getConnection()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Welcome to the Toad Data Point user community...

Have seen this issue on occasion for other data sources. These messages point to a problem with Toad's data hub, which can use a mySQL database. There are situations where OS upgrades or other IT activity on the workstation can possibly corrupt something in the Hub files/database.

The TDP Knowledge Base article here shows the resolution steps (also given below) that typically fix this issue, even though the article involves a data connector other than Mongo... Essentially, the steps below will "reset" your hub to its default state.

  1. Close Toad.

  2. Rename the "Toad Data Point Hub Data" folder, located in C:\Users\AppData\Local\Quest Software, to "Toad Data Point Hub Data_OLD".

  3. Restart Toad.

Hope this helps. If the issue continues, I would open a Support ticket.

1 Like

Thank you very much, this method solved the problem with starting the connection to the MongoDB database, but I could not complete it - it shows this error: "Data Service Database Error. See screenshot below.

In the same time I could connect with this credentials from MongoDB Compass

Back from vacation... anything extra about the connection? e.g. SSH/SSL, or possibly network segment/domain auth issues?, etc.... note that there is an SSL tab in the connection properties panel if this is the case, or at least make sure there's nothing specified there that might "get in the way" of a successful connection.

On the SSL tab: image

OK, if you're sure that the credentials being used in TDP are exactly the same as used in your native tool, I would open a Support ticket, please. Same credentials in the native tool should be working here in TDP.

1 Like

We decided to try adding the "authSource=admin" parameter through the domain name and DNS TXT record, as described in docs.mongodb.com.
If it does not start working after that, I will ask you to open a ticket.