Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up new instance of MySQL what is Current Root Password?

Tags:

mysql

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.

like image 425
Doug Kimzey Avatar asked Nov 26 '13 16:11

Doug Kimzey


People also ask

What is my current root password while installing MySQL?

In order to recover the password, you simply have to follow these steps: Stop the MySQL server process with the command sudo service mysql stop. Start the MySQL server with the command sudo mysqld_safe –skip-grant-tables –skip-networking & Connect to the MySQL server as the root user with the command mysql -u root.

How set MySQL root password after installation?

Use the following procedure to set a root password. To change the root password, type the following at the MySQL/MariaDB command prompt: ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyN3wP4ssw0rd'; flush privileges; exit; Store the new password in a secure location.

How do I find my MySQL username and password?

In your local system right, go to this url : http://localhost/phpmyadmin/ In this click mysql default db, after that browser user table to get existing username and password.


1 Answers

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.

like image 75
5 revs, 2 users 71% Avatar answered Oct 02 '22 07:10

5 revs, 2 users 71%