13

I am new to MySQL and am setting up a new instance of MySQL using the Windows Installer and am being prompted for two passwords.

The Current Root Password and the MySQL Root Password.

Is there a standard Current Root Password for new installations?

What is the difference between the two passwords.

2
  • Did you enable the "Enable root access from remote machines" option during setup? Commented Nov 26, 2013 at 16:25
  • Hi Anil - I am using the Windows install for web access. There were no prompts for "Enable root access from remote machines". Commented Nov 26, 2013 at 16:35

6 Answers 6

34

If you don't remember your current root password and want to install new instance of MySQL and you have applied other ways like "-init-file.txt", but still failed.

There is another solution which worked for me. Uninstalling MySQL from control panel didn't remove all files, it left some references in the system.

  1. To delete MySQL files completely, open the folder path C:\Users\your pc name\AppData\Roaming and delete the MySQL folder.

  2. Then remove one more reference which is in C:\ProgramData\MySQL, if not visible check your folder view options and uncheck "Don't show hidden files".

  3. The last reference of MySQL exists in our system services:

    Type "Services" in the search box of the taskbar. Find services related to MySQL and note them down. I have two in my case(MySQLRouter and MYSQL80).

    Open the command prompt with administrator and type:

    sc delete "ServiceName",

    In my case:

    sc delete MySQL80

    sc delete MySQLRouter

    Ensure all services related to MySQL are removed by using the above command. Restart your computer and install your MySQL instance with a new configuration.

0
8

The standard password for user root is simply: password

Each user had its own password. So a password must belong to a user. So the only difference of password are just what they contain.

root is AFAIK the only user created upon installation. Did you create a new user after installation?

5
  • 1
    Hi Kay - Thanks for your reply. This is the first prompt encountered during installation - so I have not established any user accounts yet. It almost appeared to be a prompt for cases where you are updating an existing installation and needed the password for the existing installation. In my case it is a first time installation of MySQL - so did not know what the Root password was for out-of-the-box installs. I routinely work with MS SQL server and was not sure if Root password was an administrative password or not. Commented Nov 26, 2013 at 19:01
  • Hmm sounds like there is a previous installation. Can you create a new service name so that it does a complete new installation? so when you run the installation you give it a new service name like mysql_new or something to distinguish them. Commented Nov 27, 2013 at 9:00
  • Hi Kay - I'm not aware of any prior MySQL installations. I finally used password and set a MySQL Root Password. When I tried to use the new password (or any password) in the MySQL Command Client, the Command Client immediately closes. If I simply hit enter the Command Client remains running. Is there a minimal install I can use if I only want to submit queries to a remote server? Commented Nov 27, 2013 at 11:47
  • Are you connecting as user root? Check in the shortcut to the command client which user is being used. Commented Nov 27, 2013 at 11:57
  • 1
    It looks like it - "-uroot" is a parameter. I changed my command line options and am now in. Thanks very much for all of your help and patience! Commented Nov 27, 2013 at 12:42
6

issue:- new mysql installation steps asks for current root password when it ideally should be prompting set new password option.

solution :-Issue could be due to existence of a previous unsuccessful mysql installation, leaving behind contents even after uninstalling.(at c:mysql,c:/ program files/mysql,c:/program data/mysql ) In my case they required manual deletion;after which new installation of mysql went on smooth . (had to msconfig too, to handle unending windows hanging sometime during the process.)

1

The community wiki has an excellent guide on the steps that one needs to follow.

Please note that uninstalling MySQL from the installer gives the option to remove all data as well, which by default is unselected.

Check the box and then uninstall MySQL.

After that, follow the guidelines in the community wiki.

1

Uninstall mysql all setup fully Delete all files related to MySQL From program files, program files x86:

C>username>appdata_>Roaming>mysql

After that install mysql

0

Try switching to root user using su or sudo -i, if possible, then use password as password.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.