View Full Version : [ubuntu] Can't start mysql as root
March 10th, 2009, 11:30 PM
When I try to start mysql as root I get the following error:
~$ mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
root and I are set up as users in mysql users group. I am a newbie so be patient.
March 11th, 2009, 12:08 AM
mysql -u root -p
use sudo if you are not signed in a root
July 11th, 2009, 05:58 AM
the solution which worked for me
install webmin. to install webmin
Preparing Your System
You need to install the following packages
sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl
Download latest webmin using the following command
Now we have webmin_1.340_all.deb package you need to install using the following command
sudo dpkg -i webmin_1.340_all.deb
If your server complains that there is some library things does not find. Just run the following command
sudo apt- get install -f
You should now be able to login to Webmin at the URL https://localhost:10000/
go to webmin login
click on mysql
click change password option,put ur new password.....now on terminal type.
mysql -uroot -p ..........bingoo........
July 11th, 2009, 12:14 PM
mysql -u root -p
use sudo if you are not signed in a rootCan you explain to me why that would be necessary?
I never have to be root on my Slackware LAMP servers to connect to the mysql server with root privileges. I login on the server as myself and use mysql -u root -p to connect to the mysql server with root privileges.
PS I don't run mysql on Ubuntu so I'm just trying to understand.
July 11th, 2009, 02:17 PM
mysql -h localhost -u root -p
Still the same error ?
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.