0

Upon installing MySQL from Oracle on my Windows machine I was prompted to enter a root password for the MySQL server. I set the following password:

eL;(4QWe-nIhq'A%t@cpJN{7PaVwvcTcsdGAYx8K

Now when I try to change settings on this server the installer asks me for my root password. When I try to type this I get the following error:

Unhandled Exception has occured in your application. If you click Continue, the application will ignore this error an attempt to continue. If you click Quit, the application will close immediately.

Keyword not supported.

Parameter Name: (4QWe-nIhq'A%t@cpJN{7PaVwvcTcsdGAYx8K; protocol.

Error Upon Typing the Password

Is the solution just to work with a simpler password?

Underdetermined
  • 419
  • 4
  • 9
  • The problem seems to be related to using a "(" in the password which seems to be not allowed. – Underdetermined Aug 03 '16 at 12:47
  • It appears the installer doesn't properly escape the password, interpreting the `'` as end-of-string character. Frankly, quite ridiculous. As for how to change the password: through the command line, try searching. – CodeCaster Aug 03 '16 at 12:50
  • So, they have SQL injection in installers! Cool! – Vesper Aug 03 '16 at 12:50
  • Possible duplicate of [Resetting ROOT password in MySQL 5.6](http://stackoverflow.com/questions/21651898/resetting-root-password-in-mysql-5-6) – CodeCaster Aug 03 '16 at 12:51

1 Answers1

0

I solved this problem by reinstalling the server. Another method to resetting the password is as follows: documenation

  1. Log on to your system as Administrator.

  2. Stop the MySQL server if it is running. For a server that is running as a Windows service, go to the Services manager: From the Start menu, select Control Panel, then Administrative Tools, then Services. Find the MySQL service in the list and stop it. If your server is not running as a service, you may need to use the Task Manager to force it to stop.

  3. Create a text file containing the password-assignment statement on a single line. Replace the password with the password that you want to use.

MySQL 5.7.6 and later:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';

MySQL 5.7.5 and earlier:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');

Save the file. The example assumes that you name the file C:\mysql-init.txt.

  1. Open a console window to get to the command prompt: From the Start menu, select Run, then enter cmd as the command to be run.

Start the MySQL server with the special --init-file option (notice that the backslash in the option value is doubled):

C:\> cd "C:\Program Files\MySQL\MySQL Server 5.7\bin"
C:\> mysqld --init-file=C:\\mysql-init.txt
Underdetermined
  • 419
  • 4
  • 9