com.mysql.jdbc.PacketTooBigException

I just had to deal with the same error message, thrown by DriverManager.getConnection(URL,username,password). I even got the same “magic numbers” (4739923 > 1048576); googling for those “magic numbers” will show results from people also getting the error thrown by some DriverManager.getConnection statement. In my case, the error message about packet size was COMPLETELY MISLEADING; I … Read more

Using MySQLConnection in C# does not close properly

Im unsure about mysqlconnection but the sql server counter part uses Connection pooling and does not close when you call close instead it puts it in the connection pool! Edit: Make sure you dispose the Reader, Command, and Connection object! Edit: Solved with the ConnectionString Parameter “Pooling=false” or the static methods MySqlConnection.ClearPool(connection) and MySqlConnection.ClearAllPools()

“Cannot open user default database. Login failed.” after installing SQL Server Management Studio Express

This may not be answering your question specifically, but it may help others with similar issue caused by different problem In my case the problem was my user is defaulted to a database which is not accessible for any reason (can be renamed, removed, corrupted or …) To solve the issue just follow the following … Read more

What is the point of “Initial Catalog” in a SQL Server connection string?

If the user name that is in the connection string has access to more then one database you have to specify the database you want the connection string to connect to. If your user has only one database available then you are correct that it doesn’t matter. But it is good practice to put this … Read more