Fail configuration of MySQL server installation - mysql

I was trying to reinstall MySQLServer on my local machine (Win7 32), using Windows (x86, 32-bit), MSI Installer.
When wizard configure server, after installation, gives the error "Configuration failed", with details:
mysql-server-5.5-win32:6 - Looking for valid template
mysql-server-5.5-win32:13 - Found valid template.
mysql-server-5.5-win32:20 - Attempting to process template.
mysql-server-5.5-win32:26 - Processed template.
mysql-server-5.5-win32:33 - Attempting to configure service.
mysql-server-5.5-win32:40 - Configured service.
mysql-server-5.5-win32:46 - Attempting to start service.
mysql-server-5.5-win32:100 - Unable to configure service.
mysql-server-5.5-win32:100 - Product configuration controller finished configuration.
Why does it happen?
Can it result from using a wrong "old" password that I put in the installation wizard, to set a new password? If yes - How can I clean up ALL previous settings of MySQL server?

Uninstall MySql and all his components excepted Oracle installer, re launch installer, do normally, when your error comes, finish the procedure of installation.
Next step, in start menu search "services", execute services administration tool, right click on the service "MySql Server XX", select "Connexion" tab and check "system account" on start user, launch the process and it would work.

I was struggling with upper problem over 3 days and I think there is a bug when you want to install this with local connection (not tick TCP connection) via .msi installer. After i selected this the configuration passed properly with no fail configuration. My sollution was to run this with set tick on TCP connection and then in server folder in my.ini file just uncomment line # skip-networking .
Other tips:
Turn off the firewall or add rule for installer to accept public/private net connections.
Under admin privileages use netstat -ab | more command to check ports usage
If u fail with earlier installations run services.msc command find your service (installer set is as defauls something like MySQL56,MySQL56_1 - depending on version) get the name of this service and under admin privileage run cmd and type sc stop "coppiedServiceName" if the service is running and later sc delete "coppiedServiceName"
In some forum says that if might be usefull to turn of windows defender or antivirus too
If you change default installation directory after reinstall check for old install files on C:\Program Files C:\ProgramData and get rid of them
Hope somebody find this usefull.

I had the same issue on Windows XP. The problem was caused by the localization. I had to change the path to the All User's AppData folder using regedit. The original path contained a non ANSI character.
The registry key is this:
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
The value name is this:"Common AppData"
The original value was: "%ALLUSERSPROFILE%\Data aplikací"
I changed it to: "%ALLUSERSPROFILE%\AppData"
Then the installer succeeded.
NOTE: Uninstall MySQL first, then change the path, then install MySQL again.

Related

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????
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.
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.
I solved this problem as follows. currently my.ini file encoding is UTF-8. you must change to ANSI.
I've done numerous suggestions and none work. Except this one:
Download and run the latest MySQL Installer.
A window will appear showing your installed services:
MySQL Server
MySQL Workbench
MySQL Shell
etc.
Click "reconfigure" on the MySQL Server and set up the server as you did previously.
My specific server setup was:
Type and Networking: leave as default
Authentication Method: (RECCOMENDED)
Accounts and Roles: Enter and check mysql password
Windows Service: Uncheck 'configure as a service'
Apply configuration: Execute
Server should be up and running.
in my case I had solve this way
Go to RUN----->Services.msc----->MYSQL80---->start server
hope this way problem will solved.
On my Windows installation the account the service runs under did not have (security) permissions to the non-existing data directory. After creating the data directory which was "Program Files\MySQL\MySQL Server 8.0\data" and setting permissions everything worked with a "net start mysql80".
Here are the steps I took to resolve my MySQL Workbench 8.0.23 issue
that resulted in an inability to start & stop the MySQL server process (mysqld)
from MySQL Workbench (O/S=Windows only answer)...
Close MySQL Workbench
In C:\Users<Your account>\AppData\Roaming\MySQL\Workbench\serverinstances.xml:
Replaced:
sc start MySQL80
sc stop MySQL80
With:
net start MySQL80
net stop MySQL80
Notes:
My mysqld service was installed w/ the name='MySQL80', replace/match this value to your actual service name.
My mysqld service was installed using a 'Network Service' account, verify that your service is also running as a network service before using the 'net' commands
Setup MySQLWorkbench CE 8.0 executable to 'Run As Administrator' so that the commands to start and stop the service run as an administrator:
In File Explorer find the MySQLWorkbench.exe executable:
E.g: C:\Program Files\MySQL\MySQL Workbench 8.0\MySQLWorkbench.exe
In File Explorer, Select the exe, Right click on the exe, select 'Properties', select
'Compatibility' tab: specify 'Run This Program As An Administrator'
Start MySQL Workbench
Attempt to start or stop the MySql server process (mysqld)
Notes:
O/S = Windows 10 specific
MySQL & MySQL Workbench were installed via the MySQL CE 8.0.23 installer
Installed MySQL 8.0.23 as an upgrade from 5.7 to 8.0.23
If this error while starting/connecting the server from Workbench then you need to Go Start->MYsql workbench Installation Click.
Open and reconfigure the MySQL server with port number and Create Root user Password.
Finish this Re-configuration then open workbench. Provide the Port number and Credentials and connect to DB.
In window you may use task manager
just open task manager by search "task manager" in window search
Go to service and find Mysql (name depending on the name saved when initializing mysql server at first time)
Right click it and click start to start server or stop to stop server

How to resolve writing configuration error while installing mysql?

I am new to MySQL. I downloaded the MySQL windows installer and selected I guess everything I thought I would need for x64 and x86 products especially utilities, workbench and MySQL Server for MYSQL 8.0.15
When I get to the Configuration Steps section I select Execute and this is what happens:
Writing Configuration file turns red.
Next I checked the Log File:
The Log File states:
Beginning configuration step: Writing Configuration File
Invalid server template
Ended configuration step: Writing configuration file.
You didn't provide us with your windows version. Supposing it's windows 10, which by default, has restricted use of certain part of the system drive (C:) to mitigate security breach . Try disabling the mechanics by the following steps:
Press win + r to open up the Run window. Enter regedit to start the registry window.
Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\
Set the value of EnableLUA in the right part of the window to 0.
Bounce the box.

MySQL Installation Error when Initializing database [duplicate]

I was installing MySQL installer on my windows 8 machine. During the server configuration process, it gets stuck at "starting server" and doesn't move any further. The log for the same is :
Beginning configuration step: Stopping Server [if necessary]
Ended configuration step: Stopping Server [if necessary]
Beginning configuration step: Writing configuration file
Ended configuration step: Writing configuration file
Beginning configuration step: Updating firewall
Adding firewall rule for MYSQL56 on port 3306.
Successfully added firewall rule.
Ended configuration step: Updating firewall
Beginning configuration step: Adjusting Windows service [if necessary]
Attempting to grant Network Service require filesystem permissions.
Granted permissions.
Adding a new service
New service added
Ended configuration step: Adjusting Windows service [if necessary]
I have already tried the following:-
* Un-installed all the programs that were in any way related to MySQL.
* Deleted the MySQL folder from C:\Program Files.
* Cleared my registry.
and then re-installed the program, but all in vain.
The link MySQL Installer Stuck on "Starting Service" also shows the same problem but the solution provided is not working for me.
Here is what I did:
Installed it with mysql-installer-web-community-5.6.23.0.msi
For my purposes I selected "Custom" install with MySQL servers 5.6.22 - X64 and MySQL Connectors -> Connector ODBC/5.3.4 - 64
Next -> Execute -(ready to configure) -> Next
Config type: Development machine, all defaults (TCP/IP, Port: 3306, Open firewall)
Typed in MySQL Root Password
MySQL user Accounts -> Add user (username, password, OK) -> Next
Configure MySQL Server as a Windows Service (CHECKED)
Windows Service Name: MySQL56 (default)
Start the MySQL Serve at System Startup
THIS IS CRUCIAL (BUG IS HERE): Run Service as...
Standard System Account (CHECKED - but it will be disregarded and that is BUG)
Next -> Execute, Installation hangs on Starting server, so wait for a while to time out (or don't, your choice). When Dialog (might be covered with other windows) popup with message "Configuration of MySQL Server is taking longer than expected..., here click OK (so to wait longer)
Meanwhile go to Start -> Control Panel -> Administrative Tools -> Services -> find MySQL56, right click on it -> Properties -> select Log On Tab AND HERE IS BUG -> Although Local System Account was selected, Somehow "This account: Network Service (with some password) was selected -> Select Log on as: Local System Account, Allow service to interact with desktop -> Apply -> Go back on general tab
On general tab click on "Start" button to start service and here it is! Service is started! Click on OK to close MySQL56 Properties dialog. Close Services dialog. Close Administrative tools. Close control panel.
And by that time (while you were closing those dialogs) when you look at MySQl Installer Dialog all steps are finished and checked: Starting Server, Applying security... Creating user accounts.. Updating Start menu link
Confirm with Finish -> Next -> Finish
That's it, happy MySQL-ing :)
The installer has another issue that I discovered today.
I had the same issue of the installer hanging on "Starting Server". However, after looking at the windows Event Viewer under Windows Logs -> Application, I discovered the error
"Too many arguments (first extra is 'Something').For more information, see Help and Support Center at http://www.mysql.com.".
The issue is that the installer cannot handle spaces in the windows service name (the name I used was Something MySQL). Simply change the name to one without spaces.
My issue was the special character in the password.
What I did to resolve being stuck at the Attempting to Start Server:
1. Use the installer to uninstall the previous version/installation
2. Validate and delete the existing MySQL Folders (DATA and App)
3. Re-install using the installer
4. Use a strong lengthy password with no special character password
This seems to be a chronic issue with MySQL Installer even now (v1.4.17.0). No matter what, every time I (re-)configure an instance on Windows 7 Pro or Server (2008 R2) it hangs at this point.
Simplest fix is:
When the installer hangs, open Windows Services and locate your mySQL service instance(s).
Double-click to open the/an instance and set Log on as: to Local System account and check Allow service to interact with desktop.
Optionally but preferably set the Recovery options to allow the service to resume after a problem.
Ensure that Startup type is set to Automatic (or whatever your preference is).
Click Apply and then click Start (or click OK and then start the service).
Return to the MySQL Installer and close any open warning about waiting for the process to complete and the process should continue.
Repeat as required for each MySQL Server instance.
Note: The installer seems to not enable the firewall exception that you may have selected when MySQL Server was first configured, so you may have to reconfigure again to open the firewall.
Side note: All-in-all, I'd have to say that after only two days of using the MySQL ecosystem, I'm less than impressed by how buggy things are. I would estimate that I had to set up two server interfaces about 6 times before everything worked as advertised. Workbench crashed on me 5+ times in the first day alone and I've had to traipse through any number of forums finding answers to stuff like this. Be prepared to do the same.
I had the same problem where it changed from Local System Account to Network Service, I changed it in the services back to Local System Account. This however did not work. I came across another forum that suggested having spaces in the services name was causing the problem so I took out the spaces and put underscores and sure enough it worked!
Change spaces to underscores!
Adding this for others.
I had install set up to configure windows service.
Looking in Windows Event Viewer => Windows Logs => Application I found:
C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld.exe: Error while setting value '0.0' to 'lower_case_table_names'
Checking the init file in C:\ProgramData\MySQL\MySQL Server 5.6\my.ini
I found:
# Specifies the on how table names are stored in the metadata.
# If set to 0, will throw an error on case-insensitive operative systems
# If set to 1, table names are stored in lowercase on disk and comparisons are not case sensitive.
# If set to 2, table names are stored as given but compared in lowercase.
# This option also applies to database names and table aliases.
lower_case_table_names=0.0
I changed the value to 0, but on reinstall it reappeared as 0.0 so during the install and whilst the installation hanged at 'Starting Server' I edited the my.ini file, saved it, opened the services viewer and manually started the service MySql56. The installation then completed
The MySQL developers insist that running the MySQL service Logged On as NETWORK SERVICE IS the proper way to do it and that running it as LOCAL SYSTEM opens security holes. Okay, people, the root of the problem here is that NETWORK SERVICE can't access the locations where the log files are configured to be. I suspect this error occurs when a folder is specified (by clicking Browse) that the NETWORK SERVICE doesn't have access to. In my case, I specified the log files to be written under My Documents in a folder called MySQL Logs. So, (and this can be done while the installer dialog is open, it says the installer is taking a long time, and prompting you to Wait or Cancel,):
I simply granted full control of that folder to the NETWORK SERVICE by right-clicking on the folder, selecting Properties, selecting Security, then clicking Add, then typing in "NETWORK SERVICE". Then I selected NETWORK SERVICE and clicked the checkboxes Allow for Full control and Modify.
I've figured this one out. Mine was getting stuck at "Starting Server" too and Event Viewer had this -
The description for Event ID 100 from source MySQL cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
innobase_buffer_pool_size can't be over 4GB on 32-bit systems
So I figured out the problem was trying to start the 32-bit version of MySQL that comes bundled in with the installer on a 64-bit machine could have been the problem. Although, MySQL states it will install 64-bit of the database.
What I did was downloaded a 64-bit zipped version and unpackaged it into a temporary location. I re-ran the installer and let it install mysql. I replaced the contents of that with the other version from the temporary location without stopping the installer. Then I continued with configuration steps of the installer. It managed to start the service.
Here's full trace of the log.
Beginning configuration step: Stopping Server [if necessary]
Ended configuration step: Stopping Server [if necessary]
Beginning configuration step: Writing configuration file
Ended configuration step: Writing configuration file
Beginning configuration step: Updating firewall
Adding firewall rule for MySQL56 on port 3306.
Successfully added firewall rule.
Ended configuration step: Updating firewall
Beginning configuration step: Adjusting Windows service [if necessary]
Attempting to grant Network Service require filesystem permissions.
Granted permissions.
Adding new service
New service added
Ended configuration step: Adjusting Windows service [if necessary]
Beginning configuration step: Starting Server
Starting MySQL as a service
Ended configuration step: Starting Server
Beginning configuration step: Applying security settings
Attempting to update security settings.
Updated security settings.
Ended configuration step: Applying security settings
Beginning configuration step: Creating user accounts
Attempting to Add New MySQL Users
Added New Users.
Ended configuration step: Creating user accounts
Beginning configuration step: Updating Start Menu Link
Attempting to verify command-line client shortcut.
Verified command-line client shortcut.
Verified command-line client shortcut.
Ended configuration step: Updating Start Menu Link
I found another solution: I was using a complex password with special characters in it. When I switch to using only alphanumeric characters in the password, it installed with no issues.
I faced the same problem. Completely removing MySql from my PC and then installing it from scratch fixed my problem.
How to remove MySql Completely:
Run Command Prompt as Administrator and execute the following command to stop and
remove MySQL service.
Net stop MySQL
Sc delete MySQL
Go to Control Panel >> Programs >> Programs and Features, select MySQL Server 5.x and
click Uninstall. (If you can uninstall MySQL from Control Panel)
Open Windows Explorer and go to Organize > Folder and search options, Select the “View”
tab and under “Hidden files and Folders” choose “Show hidden files and folders”. Now
explore the following locations and delete following folders.
C:\Program Files\MySQL
C:\Program Files (x86)\MySQL
C:\ProgramData\MySQL
And if this exists, delete it too:
C:\Users\[User-Name]\AppData\Roaming\MySQL
Restart your PC and reinstall MySQL. That’s all!
I made this problem disappear by upgrading from 5.7 to 8.0.
Specifically I:
Uninstalled MySQL 5.7 (through the "MySQL Notifier").
Downloaded and ran mysql-installer-web-community-8.0.14.0.msi from https://dev.mysql.com/downloads/windows/installer/8.0.html
None of the above solutions worked for me. I finally installed an older version. You can look at the version release history from here. Instead of installing the latest MySQL version 8.0.21.0, I instead installed version 8.0.18.0 from here. It finally worked.
I managed to solve this issue by selecting "Do not secure Data folder" option (a third one in the list) during installation. Explained here: https://dev.mysql.com/doc/mysql-installer/en/server-file-permission-options.html
. Seems like installer could not get access to it

MySQL Server command mysqld is not working

(Windows 7) I just installed MySQL Server 5.7 using the MSI installer, therefore as I understand, it is installed as Windows Service.
I am having trouble launching the server using the command:
C:\>mysqld
After issuing this command in command line, nothing happens. The cursor just keeps blinking and I get stuck.
If I try to launch the server using Windows Services I get the following message:
"The MySQL104 service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs."
*(MySQL104 is the server name that I specified during the installation)
Also if I try to run this service via command line as service using command:
C:\>net start MySQL104
I get the answer:
C:\>net start MySQL104
The MySQL104 service is starting.
The MySQL104 service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.
C:\>net helpmsg 3534
The service did not report an error.
Right now the only way for me to reboot the server is to reboot my whole system, for it starts automatically at system startup.
I am running the command line as administrator. I am out of ideas.
The service is actually started, with no logs. You can run queries. (the .err log file in data folder also says this).
Check the my.ini configure file
Check the my.err(the file name is depend on your configure) for any error information
Fix all the errors

MySQL Workbench Will not connect to localhost. "Database server instance is unknown"

My MySQL Workbench is not connecting to my local host, and I cannot figure out why exactly it is reacting like this. It just started doing this one day, and randomly it will give me access although it says it is still "unknown", but I am tired of this and would like to fix it.
Since this website reqires that I have a "10" reputation to post images, I will have to describe it.
On the Startup/Shutdown tab in the administration page, it says:
The database server instance is unknown. --The "Start Server" button is faded out so that I cannot click it.
Startup Message Log
2013-07-11 08:57:51 - Workbench will use cmd shell commands to start/stop this instance
2013-07-11 08:57:51 - Status check of service 'MySQL' returned error: Not found
2013-07-11 08:57:51 - Status check of service 'MySQL' returned error: Not found
2013-07-11 09:00:55 - Status check of service 'MySQL' returned error: Not found
2013-07-11 09:00:55 - Status check of service 'MySQL' returned error: Not found
2013-07-11 09:02:01 - Status check of service 'MySQL' returned error: Not found
Then on the server status tab in the administration page, it says:
Name: mysqld#localhost
host: localhost
server:unknown
status: unknown
Connection
There is no connection to the MySQL server. This functionality requires an established connection to a running MySQL server to work.
If anyone can help out, that would be great!
Thanks
I had this problem on my Windows 8.1 machine and it turned out to be problems with the file permissions.
To repair it I went into the folder at "C:\Program Files\MySQL\MySQL Server 5.6" and right clicked on the "data" folder and selected properties. Clicked the security tab and clicked edit. From there click the ADD button then the ADVANCED button and finally the FIND NOW button. In mine I added users, administrators, and "ALL APPLICATION PACKAGES". I granted full control to the users that were already listed for the data folder and the users, administrators, and ALL APPLICATION PACKAGES.
After the permissions were repaired I opened a command prompt as administrator and changed to the "C:\Program Files\MySQL\MySQL Server 5.6\bin" directory cd "C:\Program Files\MySQL\MySQL Server 5.6\bin". From there you can execute mysqld --install which installs the MySQL service.
More information about installing the mysql service on windows can be found at http://dev.mysql.com/doc/refman/5.0/en/windows-start-service.html
[edit] Please note that if you are using a different version of MySQL than the path to the MySQL data directory and bin directory may be different on your windows machine.
The error message says it: the service with the name MySQL cannot be found. So probably your MySQL service has a different name? Do you have a service at all? Starting mysql manually from the bin folder is just that: manual. There is no service involved, hence WB cannot manipulate the run state.
When you install MySQL with the MySQL installer you have everything in place within a couple minutes and it works right from the start.
So first check if you have a service running for your MySQL server and stop starting it manually. If there's a service take its name and enter it in the Windows Service Name field of the configuration manager:
Note that MySQL Workbench can manage your server only if it is installed as a Windows service.
I had this problem on my Windows 8.1, and I solved it updating my workbench to Version6 with "mysql-installer-web-community-5.6.16.0.msi" from the official page of mysql
I have found reinstalling all MySQL products a better alternative, because some of the solutions on the internet will make another instance of your mysql server along with mysql56, which might mess things up for a beginner.
Remember to keep database files and configuration undeleted during the reinstallation.
I had problem on MAC.
Please ensure you have installed mysql and its running. Because installing only workbench app, will not install mysql service. First install mysql and run the service.
In my case, I tried with brew
brew install mysql // installing mysql
brew services restart mysql // restart service after installing
mysql --version // check version