Mysql installation failure to start server - mysql

Got a new laptop [Windows 11] and for the first time I am facing issues with MySQL server. It installs alright but fails at the step "Starting server".
When I check the logs on the next tab I get the error message:
Attempting to connect to Mysql#localhost:3306 with user root with no password... MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
I have tried other versions, tried to start server from services, changed to Local System Account under service properties, but still the server just wont start.

Related

MySQL connection error after docker removed

Error Message is:
Warning: mysqli::__construct(): (HY000/1130): Host 'host.docker.internal' is not allowed to connect to this MySQL server in E:\wamp64\www\FISH\test13\records.php on line 61
Error failed to connect to MySQL: Host 'host.docker.internal' is not allowed to connect to this MySQL server
On Windows 10, using VSCode, wamp, localhost, mysql
Was working fine, then I installed Docker Desktop on Windows
Was having trouble understanding Docker, so I uninstalled it from Control Panel ->Programs and Features.
Now when I return to localhost website, I get the error message (as above).
I have additionally removed any reference to 'docker' using regedit.
I removed all files 'docker' from file system.
Rebooted.
root user has full access to database as confirmed in:
Server: MySQL:3306 »Database: mysql »Table: user“Users and global privileges”
Any ideas how to remove error message and get system working again? Or do something to just move on from this error?

MySQL Command Line Client closing after entering password without any error

I'm using Windows Server 2016. I need MySQL for my school project. Now I've installed it and want to create a new database for Wordpress. The Problem that I have is, that when I enter my password in the Command Line Client the Client closes without any Error message. When opening the client, I get the Message: "mysql: [Warning] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe: ignoring option '--no-beep' due to invalid value ''." I also tried to connect over the MySQL Workbench, which doesn't work either.
Workbench error:

Unable to start the MySQL80 service on local computer

I'm installing the MySQL8.0.18. While applying the configuration, whenever I press the execute it stops on starting the server and does not configure it. In the log tab, it says;
Beginning configuration step: Starting the server
Attempting to start service MySQL80...
Failed to start service MySQL80.
Waiting until a connection to MySQL Server 8.0.18 can be established (with a maximum of 10 attempts)...
Retry 1: Attempting to connect to Mysql#localhost:3306 with user root with no password...
MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
Waiting 5 seconds before the next connection attempt...
Retry 2: Attempting to connect to Mysql#localhost:3306 with user root with no password...
MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
Waiting 5 seconds before the next connection attempt...
Retry 3: Attempting to connect to Mysql#localhost:3306 with user root with no password...
MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
Waiting 5 seconds before the next connection attempt...
Retry 4: Attempting to connect to Mysql#localhost:3306 with user root with no password...
MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
Waiting 5 seconds before the next connection attempt...
Retry 5: Attempting to connect to Mysql#localhost:3306 with user root with no password...
MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
Waiting 5 seconds before the next connection attempt...
Retry 6: Attempting to connect to Mysql#localhost:3306 with user root with no password...
MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
Waiting 5 seconds before the next connection attempt...
Retry 7: Attempting to connect to Mysql#localhost:3306 with user root with no password...
MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
Waiting 5 seconds before the next connection attempt...
Retry 8: Attempting to connect to Mysql#localhost:3306 with user root with no password...
MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
Waiting 5 seconds before the next connection attempt...
Retry 9: Attempting to connect to Mysql#localhost:3306 with user root with no password...
MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
Waiting 5 seconds before the next connection attempt...
Retry 10: Attempting to connect to Mysql#localhost:3306 with user root with no password...
MySQL error 1042: Unable to connect to any of the specified MySQL hosts.
Failed to connect to MySQL Server 8.0.18 after 10 attempts.
Ended configuration step: Starting the server
I don't know if its the location error or something because I saved my setup in E:\setups\mySQL\setup. It gives the error shown in the snapshot.
I tried to solve it according to the first answer here but it doesn't seem to help.
I tried to reinstall it but it still gives the same error somehow. what should I do?
Well, Error 2 in MySQL simply arises due to missing file or wrong location. Probably the path of the service you are trying to run is wrong or missing.
Here are some reference of the same problem
windows could not start the MySQL. service on local computer. Error 2 : The system cannot find the file specified
MySql service Error 2: the system cannot find the file specified
Could not start the MySQL service on Local Computer. Error 2 [FIXED]
the MySQL service on local computer started and then stopped (Can also give this a look)
Possible Solution:
Check if the path to the service MySQL80 is proper and all the files exists with proper execution and network permissions. If nothing works, you can always use a different version to see if it is working there and if it does, report a bug in the new version.
I don't know,if we have the same Mysql program design,i'am using the latest version 8.0.26.Try this:
Open your sql editor->go to navigator part left of the screen ->Inside -Instance- select Startup/Shutdown .
Then click on -Start server -button.
If didn't work ,or the program was crashed, go to windows search tool and type -Services- then search about Mysql service ,then click -start- it should be closed....
Hope this work..
I ran into the same problem.Here's how I resolved it.
Win+R
input"services.msc", then click "Enter"
find the MySQL service, right click, choose the "attribute" option
choose the "log in" option, then choose "Local System Account"
END
I hope that solves your problem.
Go to "C:\ProgramData\MySQL". You'll find a list of archived my.ini files.
Use one to replace the current my.ini file located inside "C:\ProgramData\MySQL\MySQL Server xx.0"

MySQL: Cannot start Service, Windows 10

I am aware that this question has been asked many times before, but all solutions I tried out did not work for me.
So, I installed MySQL Workbench and server. I log into Workbench as root. In the toolbar I click on Server then Startup/Shutdown and there I click on the button Start Server. But whenever I do this, I get following log:
018-05-14 21:09:59 - Starting server...
2018-05-14 21:10:07 - Server start done.
2018-05-14 21:10:09 - Checking server status...
2018-05-14 21:10:09 - Trying to connect to MySQL...
2018-05-14 21:10:09 - Can't connect to MySQL server on 'localhost' (10061) (2003)
2018-05-14 21:10:09 - Assuming server is not running
Addiotionally a popup appears which says:
Connect Error
Could not connect to MySQL: Can't connect to MySQL server on 'localhost' (10061)(code 2003)
One solution I found suggested installing the server manually. So I went into cmd as admin and typed:
C:\> "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld" --install
It gave following output:
Service successfully installed.
But in Workbench the Server is still stopped and when trying to start it like mentioned above the same logs with the same popup and error appears.
Another solution I found suggested installing MySQL Notifier and using it to start and stop the server and use it to manage monitored items. But quite frankly, once I restart workbench and try to log in as root, it wont even log in but give following pop up error:
Cannot Connect to Database Server
Your conection attempt failed for user 'root' from your host to server at localhost:3306:
Authentication plugin 'catching sha2 password' cannot be loaded: Das angegebene Modul wurde nicht gefunden.
Please:
1 Check that mysql is running on server localhost
2 Check that mysql is running on port 3306 (note: 3306 is the default, but this can be changed)
3 Check the root has rights to connect to localhost from your adress (mysql rights define what clients can connect to the server from which machines)
4 Make sure you are both providing a password if needed and using the correct password for localhost connecting from the host adress you're connecting from
So now this "Authentication plugin 'catching sha2 password' cannot be loaded:" looks suspicious and I tried looking that up. I found this solution, which requires me to log into MySQL from cmd, but when I type C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql -u root -p and execute it, it asks for the password which I provide, but then it answers with
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
Now I hit a wall and I don't know how to continue. The MySQL server still doesn't work and I am desperate.
Do you have SQL Server (MSSQL) instance installed on your machine? If so, this may cause an issue. MSSQL may "capture" port 3306. Try to stop MSSQL service and test MySQL.
The easiest way to resolve the error where the service does not start is by going into the registry as Administrator.
Navigate to HKLM\System\ControlSet001\Services\MySQL
Change image path to "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe" --defaults-file=C:\Program Files\MyNewSQL\bin\MyNewSQL.ini MyNewSQL
My problem (same as yours):
Current Registry Setting:
C:\MySQLs\MySQLDev\bin\mysqld --defaults-file=C:/MySQLs/MySQLDev/MySQLDev.ini MySQLDev
Change Registry Setting to:
C:\MySQLs\MySQLDev\bin\mysqld.exe --defaults-file=C:/MySQLs/MySQLDev/MySQLDev.ini MySQLDev
Rerun "net start MySQLDev"
The MySQLDev service is starting.
The MySQLDev service was started successfully.
On Windows 10 and previous versions, you MUST give the User assigned to the MySQL service full permission of the MySQL folders.
I believe the newest version uses, User NETWORK SERVICES, therefore use File Explorer, right click on all of the MySQL folders, click on Properties, Security, Edit and give User NETWORK SERVICES full access of those folders.
Failure to do this will result in the Service starting and stopping due to errors which are visible if you use Command Line.

New MySQL Workbench Install (Will not connect to root) Ubuntu 18.04

My newly installed MySQL workbench is refusing to connect to the root of my newly installed MySQL Community Server. Whenever I attempt to access "Local Instance 3306" (the default MySQL connection) I get the following error message.
This error message does change if I open "Local Instance 3306" via the "edit connection" tab and then "test connection". I'll get a different but similar error code.
I can access the server via the command line
and can confirm that the server appears to be active also via command line.
It is a fresh install of MySQLCommunity Server and MySQL Workbench running on Ubuntu 18.04 with only one user account. I installed both the server and workbench using apt and used the guide created by DevAnswers.co here.
After installing the server and workbench I attempted to access the server using the workbench BEFORE I ran the sudo mysql_secure_installation command. I got the same two errors. I then ran the secure installation command and assigned a password which I do remember and did input into the password field of mySQL workbench albeit with the same results. I am very new to mySQL and databases and am trying to install mySQL to learn how to use SQL. I'd appreciate any help you all can provide in resolving this issue.
Additional pictures:
and .
I suspect that you just need to follow this short guide to set a root password:
https://whs-dot-hk.github.io/ubuntu-18.04/install-mysql.html
After setting a root password, you should be able to connect to mysql-workbench.
In short the root user in MySQL is authenticated using an auth socket, not a password. That's what's giving the message you're getting in the first screenshot.
(I'm assuming this is for a development project, for a production project you should keep the default config)