I can install the mysql but while configuring it i am getting error like this: ** 1045 : access denied for user root@loaclhost.** i can install it i cant configure it. Please help...I am quite new to this.
Asked
Active
Viewed 174 times
0
-
Off-topic for SO: try [sf]. – eggyal Jul 22 '12 at 09:20
-
did you specify a pwd for the root user? have you tried resetting the pwd, logging in as root and tried againn? – Jul 22 '12 at 13:47
1 Answers
1
did you specify a password for the root user - there is no pwd for the root user by default so if you have not specified a password for the root user, you can connect like this:
mysql -u root
if you specified a password, you can connect like this:
mysql -u root -p (at which point you will get prompted for the password)
If you need to reset the password for root, you can try this:
- Stop MySQL
- Restart it manually with the skip-grant-tables option: mysqld_safe --skip-grant-tables
- Run the MySQL client: mysql -u root
- Reset the root password manually with this MySQL command: UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
- Flush the privileges with this MySQL command: FLUSH PRIVILEGES;
It would be good if you create a separate user and not use root for your DB operations (where you don't need root).

ali haider
- 1,140
- 3
- 16
- 29