Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to Start MySQL Server and Getting "Could not start server: argument 2: <class 'TypeError'>: wrong type"

I just installed MySQL using the community installer in hopes of running a server and creating a database for use in my C++ program. I installed the Server, Workbench, Shell, Router, and Connector/C++ before running the Workbench. Everything appeared to be working properly. The server was running and I was able to connect to it in my C++ program, so I started to create my database, when the power suddenly went out before I could finish.

Once the power came back on and my PC rebooted, I reopened the MySQL Workbench to find that I was unable to start the server. I clicked the 'Start Server' button several times, but was met with the error "Could not start server: argument 2: <class 'TypeError'>: wrong type".

I tried uninstalling and reinstalling everything, but when I reopened the MySQL Workbench after the installation was finished, I was met with the same error. Does anyone know what could have possibly happened?

EDIT: After uninstalling everything and deleting every trace of MySQL from my computer, I was able to reinstall everything and get the server running again. However now I'm getting the same error when I try to STOP the server: "Could not stop server: argument 2: <class 'TypeError'>: wrong type". What is going on????

like image 777
user3713569 Avatar asked Feb 06 '21 23:02

user3713569


4 Answers

I have the same issue and I've installed the developers default version of the MySQL-Workbench with the installer. I recently updated my hardware and reinstalled Windows 10, maybe it's a bug of Windows 20H2 or of the Workbench itself?

I found a workaround: Use the CMD or the Powershell to start or stop the MySQL-Service of the server. In my case, it has the name MySQL80. Take a look in your services of windows when the commands below are not working.

Use net start MySQL80 to start the server. Use net stop MySQL80 to stop the server.

Remember to open the CMD or the Powershell as Administrator. I think this issue is a bug of the workbench itself because the service is start and stopable with the command line.

like image 63
Chipmaster5 Avatar answered Nov 15 '22 19:11

Chipmaster5


The first thing to try is to run mysqld --console from the MySQL server bin folder. That should give you more specific error messages.

In my case, the data folder was missing. I needed to run one of the mysqld --initialize... commands; see https://dev.mysql.com/doc/refman/8.0/en/data-directory-initialization.html. On Windows, running mysqld --initialize... --console helps to see what server is doing.

Once that's done, you can run mysqld --console again to see if it starts successfully.

like image 39
Jon Onstott Avatar answered Nov 15 '22 18:11

Jon Onstott


I solved this problem as follows. currently my.ini file encoding is UTF-8. you must change to ANSI.

like image 1
gelistirici Avatar answered Nov 15 '22 19:11

gelistirici


I've done numerous suggestions and none work. Except this one:

  1. Download and run the latest MySQL Installer. A window will appear showing your installed services:

    • MySQL Server
    • MySQL Workbench
    • MySQL Shell
    • etc.
  2. Click "reconfigure" on the MySQL Server and set up the server as you did previously.

My specific server setup was:

  1. Type and Networking: leave as default

  2. Authentication Method: (RECCOMENDED)

  3. Accounts and Roles: Enter and check mysql password

  4. Windows Service: Uncheck 'configure as a service'

  5. Apply configuration: Execute

Server should be up and running.

like image 1
Omar Brougy Avatar answered Nov 15 '22 19:11

Omar Brougy