Today, when a local MySQL (win environment) is opened, the error 10061 indicates that the database cannot be opened. The first response is that the MySQL service is unavailable. Go to the management tool-service and check that the MySQL service is up; next, let's see port 3306. netstat-a-n didn't occupy the 3306 process. Finally, I searched the internet and found several solutions:
One is to check whether the bind-address in my. ini corresponds to 127.0.0.1 localhost In the hosts file correctly;
The second is to add the skip-InnoDB under the my. ini file [mysqld] node. It seems that this attempt is useless.
The third is to change the default engine to MyISAM. After trying it, it worked. Occasionally, I saw a Post saying that it may be caused by the initialization of the InnoDB engine, so I can check it in the/MySQL/data directory. in the err file, InnoDB: Error: cannot allocate 2147500032 bytes... the error is that InnoDB is allocated too much memory. here we can see that it is about 2 GB, So I modified it. one Parameter Setting in ini: innodb_buffer_pool_size lower than the value of 2 GB, and change the default engine back to InnoDB, OK.
It is not terrible to generate a problem. It is not a good thing to get the result directly by so. It is also a step to learn how to find errors.
We can continue to work on it. For example, how does the innode_buffer_pool_size parameter affect the MySQL service?