I can't run MySQL.exe in interactive mode in Powershell on a Nano Server installation. I have initialized the data folder with
mysqld.exe --initialize. The password is output to the file
C:\Program Files\MySQL\MySQL Server 5.7\data\ServerName.err.
I type the command:
mysql.exe -u root -ppassword, where I enter the randomly-generated password.
If the password is correct, I get:
mysql.exe : mysql: [Warning] Using a password on the command line interface can be insecure.
And then it returns me to the prompt.
If I do not specify a password when using -p or --password, the client program is supposed to solicit the password interactively. When I try that, I don't get any prompt, nothing written to the console, and when I press CTRL-C, I get:
The remote pipeline has been stopped.
Are these executables capable of being run under a Powershell remote session? Is there something wrong with the way I'm trying to use the console? Maybe this a problem with my Powershell configuration?
Update: After deleting and reinitializing the data folder, I keep getting
Access denied for user 'ser=root'@'localhost' (using password: YES) when I enter the randomly generated password using the following command:
& mysql –user=root –password=(password). I have also tried to change the password using a text file with
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'; in it, but when I do that, I have to press CTRL-C to return to the prompt, as stated previously. Looking at the error log, MySQL claims to have processed the text file, but I still can't logon.