Installing MySQL and checking root password fails? - mysql

I recently uninstalled and reinstalled MySQL (on Windows 7) using the installer. When I try to set up the MySQL Server, it won't let me continue unless I enter the "current" root password??? I don't understand how there can be a current root password if I completely uninstalled and reinstalled the program.
I've tried with a blank password as well as every password I can possibly think of that I would have used and nothing works. Google is completely unhelpful as every result I've found either refers to a "homebrew" installation, whatever that is, or refers to installations on Linux. Is there some folder of config files that the uninstallation refuses to delete that I need to remove manually? Or am I missing something else?

After uninstallation process, please check following directories if it exists and remove:
C:\Program Files\MySQL
C:\Program Files (x86)\MySQL
C:\ProgramData\MySQL
C:\Users[User-Name]\AppData\Roaming\MySQL
PS: Please keep in mind that If you have multiple MySql Instances installed on your workstation, you need to go into each directory and delete only the relevant instance.

I too faced the same issue but the following worked for me:
Go to Control Panel >> Programs >> Programs and Features, select MySQL Server and click Uninstall.
Also uninstall the MySQL workbench, MySQL Installer Community, MySQL Router.
Then delete the files:
C:\Program Files\MySQL
C:\Program Files (x86)\MySQL
C:\ProgramData\MySQL
C:\Users\[User-Name]\AppData\Roaming\MySQL
Finally restart your system and install MySQL again.

In a fresh development machine, after installing MySQl 8.0.18 in Windows 10 64 bit, I hit this error and could not connect to MySql.
Nothing else worked.
Then I uninstalled the Mysql and deleted C:\Program Files\MySQL and retried installing MySql 8.0.18 and while re-installing it asked to specify root user password.
After specifying the root password, I was able to connect.

I was also facing the same problem, i tried the same process and this works for me too. Also i uninstalled my MySQL installer, MySQL shell, MySQL workbench, MySQL server and all connectors and routers from my Control Panel>>Uninstall a program and after deleting everything. I tried this solution install MySQL again from the oracle website and everything worked fine.

when I was facing the same issue, I used "password" for root password, which is default for MySql.

Related

Cannot find mysql bin file in macos

I am having a lot of problems with mysql on macos 10.14. It started with trying to reset my password. Back when I collaborated with someone in 2018 my collaborator used mysql but I did not know how to work it. I have a feeling that the password I used for mysql is not the typical password I used because my attempts to log in failed. watching this video I was told at 9:12 that the password would be set on installation but that turned out to be false. I was never asked for a password upon downloading but perhaps that is because I had part of mysql already downloaded on my computer but I did not have the workbench installed. All of my attempts to reset the password failed. So I then tried deleting mysql and redownloading. Now I am not able not to start the mysql server from mac's system preferences. But that's not my largest problem. I still cannot reset the password and hence even use the app. Following official mysql instructions I cannot reset the password because it requires the location of a pid file. It says
Stop the MySQL server if it is running. Locate the .pid file that contains the server's process ID. The exact location and name of this file depend on your distribution, host name, and configuration. Common locations are /var/lib/mysql/, /var/run/mysqld/, and /usr/local/mysql/data/.
In the folder for mysql located in /usr/local/var/mysql there is no pid file. A lot of the tutorials I've seen recommend using terminal but I cannot use terminal for mysql because I get the mysql command not found error. Ok, so to fix that problem trying this tutorial here it says:
If you’re installing MySQL using the official installer, then your MySQL bin/ folder should be located on /usr/local/bin/mysql
So now I need to find the mysql bin file but when I write ls in the /usr/local/bin folder, mysql does not come up. All of the file beginning near 'my' are
multinit
murge
nasm
So I'm stuck. I find it simply incredible that such a simple thing as resetting a password is so difficult.
Let’s say we installed MySQL version is 8.0 on our Windows OS. The bin directory is present at the following location −
C:\Program Files\MySQL\MySQL Server 8.0\bin

Installing mySQL on Windows

Downloaded and run the installer from https://dev.mysql.com/downloads/installer/
After installing it opened MySQL Workbench but I can't connect to localhost (I notice that the installer didn't ask for a root password), and I can't see a MySQL service in services.msc.
Is there something that I need to do -- in addition to running the installer -- to get it to work? (And is this documented?)
Run the installer for a second time and choose Reconfigure.

MySQL Workbench Unable to Retrieve Disk Space in Data Dir, Server Stopped

I had mySQL workbench working fine a few weeks ago. Now, any time I log in, I get no connection. Upon inspecting Sever Status, it is showing Stopped. Also, under the Server Directories, it says Unable to Retrieve next to Disk Space in Data Dir.
I also noticed that the configuration file was wrong, or outdated? The Configuration File originally read:
C:\ProgramData\MySQL\MySQL Server 5.5\my.ini
But I looked and there was no MySQL Server 5.5 file in my directory. I do have a MySQL Server 8.0 folder, so I changed the Configuration File to:
C:\ProgramData\MySQL\MySQL Server 8.0\my.ini
However, this fails to solve the problem. I've also attempted to run Services from the Start Menu, right click on MYSQL80, and choose start - and it says the service has Started then stopped.
I'm not even sure this missing or mis-directed file is the issue, or whether it's the Unable to Retrieve Disk error (or both are causing the server to fail). I recently changed my login password for my computer - but I doubt that is related to the login credentials for MySQL, right? (I see MYSQL80 properties has password for 'log on' option, but I have no idea what this password even is, or how to change it).
I've also read about this problem online and cannot seem to find an answer that solves the issue. I've tried running MySQL Workbench as an admin too, and that doesn't work either.
Can anyone point me in the right direction? Is there a way to get the server up and running again without a bunch of complicated command line? I appear to have mysqld.exe in the bin file in MySQL 8.0
Thanks all in advance!
In MySql Workbench Server -> Startup/ShutDown -> Start Server.
This Worked for me.
When the my.ini file is messed up I think the best solution is a total uninstall/delete and manual install. Before you do any of the following make sure you go to your current data dir and save your database folders. Then dlete all of your current MySQL related directories and uninstall MySQL and MySQL workbench.
I had this problem when I installed MySQL 8.0.15 with the community installer. The my.ini file that came with the installer did not work correctly after it had been edited. I did a full manual install by downloading that zip folder. I was able to create my own my.ini file containing only the parameters that I was concerned about and it worked.
download zip file from MySQL website
unpack the folder into C:\program files\MySQL\MySQL8.0
within the MySQL8.0 folder that you unpacked the zip folder into, create a text file and save it as my.ini
include the parameters in that my.ini file that you are concerned about. so something like this(just ensure that there is already a folder created for the datadir or else initialization won't work):
[mysqld]
basedire=C:\program files\MySQL\MySQL8.0
datadir=D:\MySQL\Data
....continue with whatever parameters you want to include
initialize the data directory by running these two commands in the command prompt:
cd C:\program files\MySQL\MySQL8.0\bin
mysqld --default-file=C:\program files\MySQL\MySQL8.0\my.ini --initialize
install the MySQL server as a service by running these two commands:
cd C:\program files\MySQL\MySQL8.0\bin
mysqld --install --default-file=C:\program files\MySQL\MySQL8.0\my.ini
finally, start the server for the first time by running these two commands:
cd C:\program files\MySQL\MySQL8.0\bin
mysqld --console

During Install I can not create users, and other issues with install

Good Morning Stack Exchange!
Trying to get mysql installed on my personal computer and I've run into a few issues.
I can not create a user during install, If I try to add a user during install it fails on the create users step. So I figure I will just add the users after install via sql workbench, which brings me to number 2.
After installing mysql server, attempting to connect to the server with mysql workbench just asks me for the password endlessly until it locks me out. I know the password I'm using is correct because when I modify the mysql server instance via the installer it asks for the current root password, adn the password works there.
After install, if I stop the mysql service from running mysql workbench loads without issue.
Mysql installer can not stop the mysql service, to modify an install I have to manually stop the service.
The common thread to all of these issues is the windows service for mysql.
Troubleshooting steps
verified port 3306 was open in the firewall
disable firewall entirely
Turned off anti-virus
uninstalled anti-virus
Multiple restarts of both the service and computer
Uninstalled all my sql components and reinstalled (multiple times)
changed the root password via command shell (via This MySQL guide for recovering the root password)
Downloaded the installer again in case there was a corruption of my original file.
So I'm pretty stumped, I've been at this for two days and I don't feel any closer to a solution.
Configuration info:
windows 10 (intel core i-5, 16 gigs of ram, 96 gigs of open space on SSD)
MYSql Installer version 8.0.13.0
The first thing I would check is the logs.
However, given the info you provided it sounds like default settings are there but no root#localhost user password or root#127.0.0.1.
Check the my.ini existence for details and logs.
You may have to follow this to create the config file if it doesn’t exist - follow the link below.
https://dba.stackexchange.com/questions/21835/mysql-workbench-asking-for-password
Error log location in windows:
The error log is located in the data directory specified in your my.ini file. The default data directory location is C:\Program Files\MySQL\MySQL Server......

Using XAMPP Install of MySQL with Netbeans 6.8/MySQL Workbench

All,
For all of this I am using Mac OSX Snow Leopard.
I have happily used XAMPP to develop PHP backed sites in the past with no problems(as you'd expect for such a simple to set up package). I am now trying to set up this MySQL install in Netbeans 6.8 (for now just trying to get a sample database backed webapp to run). My issue is that even though MySQL has been started I cannot connect to it at 127.0.0.1 on port 3306 (which it is set up to use).
I have read that the issue is that XAMPP holds MySQl.sock in /Applications/XAMPP/xamppfiles/... whereas MySQL Workbench and Netbeans expects to find it in /tmp/MySQL.sock. Is this correct? I've tried to set up a symbolic link from /tmp to the xmapp directory but this doesn't appear to have changed anything.
Is there anything else I can try/anything that I am missing?
I upgraded from an older version of XAMPP to 1.7.3 and encountered a the same problem, I got MySQL Workbench to connect if I edited the my.ini file and:
changed the socket parameter to:
socket = "TCP/IP"
made mysql bind to an IP address or all IP as in the case below:
enable-named-pipe
bind-address=0.0.0.0
This requires that you disable named-pipe (as shown above)
I could not get this to work. So in case anyone else is reading this and wondering what happened... I installed a non XAMPP instance of the MySQL database and am using that now instead. Less than ideal but it works.