Mysql won't start server during installation - mysql

I am trying to install mysql5.54 on windows 10 (1909) on a computer. Using Mysql latest installer.
Using port 3308
I have two issues:
1: I have to uncheck "Server data file" to complete install. (If I leave it checked, it always tells me it failed during installation)
During "Apply configuration", it stops in "Starting the server" for ever.
Can someone tell me how to trace the problem? I've installed this for many times, never had this problem previously.
I have mysql 5.7 installed on another port 3306, I don't think this will be the case.
I tried to run mysql.exe cmd line, it said:
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
why it is denied my root user?
Thanks,

you should consider using docker or a vm, running two sql server on one computer can cause trouble obviously.
But i think you should choose only a different path for your second server
https://dev.mysql.com/doc/mysql-installer/en/mysql-installer-change-path-proc.html
So mysql can use it to store its cnf/ini filr an use a different data folder

Related

MySQL on Windows - Access denied for user 'root'#'localhost' after fresh install

I've installed the latest MySQL on Windows 10 Pro. I included the wizard steps to set up initial values and chose to set it up as a dev machine. I left everything to the default values. After installing and restarting the machine, there's no way to connect to the database it seems.
I get the MySQL Error 1045: Access denied for user 'root'#'localhost' (using password: YES) error both in MySQL Workbench as well as the MySQL Shell.
I've tried to set skip-grant-tables in my.ini as that comes up in a lot of answers on here. When I set that and try to start the MySQL80 Service, it shuts itself down within seconds again.
I've also tried to start with mysqld.exe --skip-grant-tables as per this answer but that gave me the error that it couldn't find C:\Program Files\MySQL\MySQL Server 8.0\data. This folder indeed didn't exist, after making this folder myself and running mysqld.exe --skip-grant-tables again, 3 files were added to this folder but I'm immediately thrown back to my CMD shell and no mysqld.exe process is running.
To reiterate, this is a Windows 10 machine, answers about sudo mysql or /etc/my.conf are N/A unfortunately.
Workbench, MySQL Shell and CMD Prompt were all running as Administrator in the above steps.
Did you try with "-p" and password "password"?
Reinstalled MySQL with legacy authentication and the weakest password it'll accept and now it works... ¯\_(ツ)_/¯

MySQL Workbench cannot connect to database in Ubuntu 20.04

I cannot open the local instance in MySQL Workbench in Ubuntu 20.04 after installing the MySQL server. I searched for some similar topics here but these did not help.
Solution Found:
I've found the solutions for this problem. This was because of the MySQL Workbench couldn't store password in keychain and also because it failed to connect to mysql at 127.0.0.1:3306 with user root access denied for user 'root'#'localhost'(using password:YES).
Use this command in the terminal: sudo snap connect mysql-workbench-community:password-manager-service :password-manager-service.
The snap package is sandboxed as usual and is not by default allowed to access the service. MySQLWorkbench is blocked by AppArmor when we choose "Store in keychain" option. That's why we need to enter the command to allow the package to access the service.
The solution links that helped me:
MySQL Workbench not saving passwords in keychain
Failed to connect to mysql at 127.0.0.1:3306 with user root access denied for user 'root'#'localhost'(using password:YES)
All I need to do here is mainly type the following command in the terminal:
sudo snap connect mysql-workbench-community:password-manager-service :password-manager-service
Here, the snap package is sandboxed as usual and is not by default allowed to access the service. MySQLWorkbench is blocked by AppArmor when we choose "Store in keychain" option. That's why we need to enter the command to allow the package to access the service.
Try adding this step.
login to mysql in the terminal
execute this command
ALTER USER 'root'#'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Check if this solved your problem <NOTE THE 'password' PART, CHANGE IT TO THE PASSWORD YOU WANT TO USE>
I tried all of the above steps, this one was the one that solved for me.
Make sure all the mentioned things working.
First check mysql is running by running below command:
sudo systemctl status mysql
If it's running make sure that your mysql username is root and password you are entering is correct. If still not working make sure you have given all the privileges to user "root".
If don't know how to set privileges read this article carefully.
https://docs.rackspace.com/support/how-to/install-mysql-server-on-the-ubuntu-operating-system/

MySQL refuses to connect when two instances of mysql created in win10 and ubuntu (dualboot)?

I'm running a dualboot system on the same ssd(one partition for Ubuntu 19.04, one for windows 10 home 1903). Both currently have MySQL 8.0 installed on them, with the same 'root' user and same password.
Before I installed mysql on ubuntu, I ran a single instance of mysql on Windows 10for my projects perfectly fine(workbench, terminal(cmd, rather) could both connect to root)
Then i installed ubuntu and(stupidly) named the mysql server user as 'root' as well, with the same password.
And now both mysql in both OS refuses to connect with the error:
"Error Nr. 1045 access denied for user 'root'#'localhost' (using password: YES)"
Trying mysql -u root wouldnt work either, throwing the error
"Error Nr. 1045 access denied for user 'root'#'localhost' (using password: NO)"
I'd really love to know why this error occurs and how I could possibly run two instances on two OS's(in the first place when the Ubuntu is shut down that instance isnt running nor listening on 3306 anymore, so why should this error occur?)
Password is definitely correct and the standard google search replies to reset the password didnt change anything either.
Thanks! :)
Did your mysql on Ubuntu and Window shared the same data directory ? Anyway, what worked for me is reinstall mysql on both platforms

Can't connect to MySQL

I'm trying to connect to MySQL, using Sequel Pro, something I have done many times before. Host 127.0.0.1, username root, no password. I get the following message:
Unable to connect to host 127.0.0.1 because access was denied.
Double-check your username and password and ensure that access from your current location is permitted.
MySQL said: Access denied for user 'root'#'localhost' (using password: NO)
For what it's worth, I got this message after upgrading to a new Mac OS (Mavericks), realized that the server wasn't running, downloaded a new server (which is currently running), and tried again - but I had the same problem.
Make sure you are running MySql in background System Preferences -> Mysql -> Start MySql
Make sure you are able to connect to MySql through command line, if command line works, there is no reason why it should not work in SequelPro.
If problem still persists, try changing the 'root' password.
It happened to my in Mac. I went to system preferences -> MySQL -> Stopped the server, started it again, and it worked.

Problem starting up mySQL

I just downloaded PHP and I tried running mySQL with the command:
C:\Program Files\EasyPHP-5.3.2i\mySQL\bin\mysql.exe
And I got the error:
ERROR 1045 (28000): Acess denied for user 'ODBC'#localhost' (using password: YES)
I found a solution online with linux, but I'm running vista on this machine and have no clue what all of that meant. Please help, I'm tired of using the school's terminals.
It means one of three likely things.
you need to either create a new user in mysql with the password you are using
set the password of the "ODBC" user to what you are using
grant permission to the host you are attempting to connect from, in this case localhost
Without more information to your specific setup it will be very difficult to answer with more accuracy.
Have you tried supplying the username to the command, for example:
C:\Program Files\EasyPHP-5.3.2i\mySQL\bin\mysql.exe -u root
?
Check the manual Connecting to and Disconnecting from the Server