I didn't get option to set root password of mysql during installation. Now, I am unable to form instance I am beginner in mysql I have tried reinstallating the software watching youtube still didn't got that option.
Loading
I didn't get option to set root password of mysql during installation. Now, I am unable to form instance I am beginner in mysql I have tried reinstallating the software watching youtube still didn't got that option.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Janarthanan SPosted May 12, 2023, 1:00 AM
Hi Prathap,
Please try this
https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en/default-privileges.html
Tuhin PaulPosted May 13, 2023, 3:47 AM
There are a few things you can try if you didn't get the option to set a root password during MySQL installation.
When prompted, enter a new password for the root user.
4. Use the MySQL Workbench graphical user interface to set a password. To do this, open MySQL Workbench and connect to your MySQL server. In the MySQL Workbench navigation pane, expand the Security folder and right-click the root user. Select Change Password from the context menu. In the Change Password dialog box, enter a new password for the root user and click OK.
Once you have set a password for the root user, you should be able to connect to MySQL using the root user and the password you set.
Mohamed Azarudeen ZPosted May 11, 2023, 9:57 AM
Stop the MySQL service:
sudo service mysql stopRestart the MySQL service with the
--skip-grant-tablesoption:sudo mysqld_safe --skip-grant-tables &mysqld --skip-grant-tablesConnect to the MySQL server as the root user without a password:
sudo mysql -u rootmysql -u rootSet the root password using the
ALTER USERcommand:ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';Exit the MySQL client and restart the MySQL service normally:
sudo service mysql startAfter completing these steps, you should be able to connect to your MySQL instance as the root user with the new password you set.
Jignesh KumarPosted May 11, 2023, 8:36 AM
Hello Pratap,
Please refer this one,
https://dbschema.com/2020/04/21/mysql-default-username-password/#:~:text=The%20default%20user%20for%20MySQL,default%20it%20has%20no%20password.