MySQL server has gone away after Shutdown and Startup Server - mysql

I am using MySQL Workbench. I shut down and restart my server. After that I was not able to execute any queries as the error always come up immediately.
Error 2006:MySQL server has gone away
I have started the MySQL57 services manually so I am sure the server is running. Looking up SO, two solutions come up - (1) set max_allowed_packet = 128M in my.ini [Failed], (2) set wait_timeout to a larger number - I cannot find the my.cnf file so this doesn't work.
What I encountered is pretty different from others as they usually had this error after a long piece of queries, but mine just comes up immediately after a query is sent. Appreciate any help (include finding the my.cnf file).
Update:
Discovered something that may help, what I have done:
Start MySQL57 from services.msc manually
Open MySQL Workbench, connect to database
Test the connection, and said "Successfully made the MySQL Connection"
Run a query, return "Error 2013: Cannot connect to MySQL Server on local host"
Run the query again, return "Error 2006: MySQL Server has gone away"
Check services.msc, the MySQL57 has been switched off.

Related

Unable to connect to localhost:3306 (2003) for MySQL 8.0.21 on Windows

I am using MySQL workbench to connect to my local server. Everything was running fine and suddenly I jumped in a connection refused errors. I tried restarting the server again and again. Clearing temp files and also restarted my machine. I found this post from which I tried a couple of things like net stop and stopping the process from the services list but in the services list it shows as below:
I waited like for 30 mins but still, the service is not stopped.
Also, below is the screenshot for MySQL workbench when I try to start the server:
Is there anything specific which I need to do in order to resolve this error:
So, I resolved my own problem in this way. I referred the documentation for this particular error and for my error which is of 2003 type it said that look for mysqld.exe process in task manager and if you don't find any then start the server. But, in my case I found 2 mysqld.exe processes running. So, I killed those processes and restarted the server. It worked!!
Might help someone someday :)

Error establishing a database connection Recurring

My server keep reporting this error.
I think there is something wrong with the mySQL server.
Every time I go into it and restart it and log in with:
mysqld_safe --skip-grant-tables &
My site works again temporarily but then reverts back to
Error establishing a database connection
It is probable that your server is running out of memory, I would suggest creating a Swapfile. You can read how to do this in https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04

Wamp- command line "mysqld" doesn't work

When I write the command line C:\wamp\bin\mysql\mysql5.6.17\bin>mysqld
nothing happens. It just shows the path again C:\wamp\bin\mysql\mysql5.6.17\bin>
and when I write this:
C:\wamp\bin\mysql\mysql5.6.17\bin>mysql
it shows an error: ERROR 2003 (HY000): Can't connect to mysql server on 'localhost' (10061)
I tried a lot to find an answer to this, but I couldn't find anything useful. Why isn't the server working?
I installed the same program for my friend, too and it works fine for her.
The error ERROR 2003 (HY000): Can't connect to mysql server on 'localhost' (10061) means that the MySQL server daemon is not running and so the client mysql can not connect. That makes sense, because mysqld doesn't start.
There are plenty of reasons, often its simply a misconfiguration or port collision (3306 already used?).
The first step is to make sure that the daemon is working without a configuration file. Please try to start the daemon by using mysqld --no-defaults.
no-defaults means that mysql will not read any option files, before starting.
If it starts up, you know that the configuration file(s) are to blame.
Then search in your my.ini for "wrong" or "old and deprecated" entries and fix them, to allow a normal startup. Its also helpful to enable logging.
If you are in doubt, go with one of the default configuration files: https://dev.mysql.com/doc/refman/5.6/en/server-default-configuration-file.html
You can check the ports with a tool like CurrPorts:
http://www.nirsoft.net/utils/cports.zip

phpmyadmin Error #2003 the server is not responding

after battling my way through every error message to try and get phpmyadmin running I am finally stumped by the last message. #2003 - The server is not responding. I think I know that its a problem between phpmyadmin and my installation of MySQL but I just cant find the hook.
I have already set the socket in the config.inc.php. I don't care if it works remotely i just need it to run locally for now. MySQL client connects just fine. I can do stuff from the command line so I know MySQL is configured and running. running typical LAMP stack CentOS 7 and mariadb. MySQL port is 3306
socket=/var/lib/MySQL/MySQL.sock (the stackoverflow web form keeps changing the case of MySQL so I am aware of the case sensitivity)
the main login page comes up fine but gives the 2003 error after typing in password. I know the correct password and I am typing it in correctly.
any help appreciated.

MySQL localhost: "connection refused"

sorry for this post that it might be repeated, but I could not quite figure out from the other posts still.
I am unable to log on mysql localhost database, and the server is down says mysql#localhost:3366 - Refusing Connections. In mysql workbench start/shutdown mysql server, it is saying the database server instance is unknown (with start server button grayed out) and refreshing the status doesn't help.
Also, the mysql server should always be running automatically in the background whenever PC is restarted, but it is not showing in the services now.
when I try to execute mysqld from cmd, it just shuts down the server. And responds with
-"The Innodb memory heap is disabled"
-"the system tablespace must be writeable"
-"InnoDB init function returned error"
-"InnoDB registration as a storage engine failed"
Anybody has a solution to this? Thanks much!
Install it. Re-install it, if you're convinced it was already installed. The fact that it isn't even listed in the services suggests otherwise however. If it was installed but wouldn't start it would still show up, but not as started.