Erik wrote regarding 'Re: [SLE] NTOP & mysqladmin' on Wed, Nov 03 at 09:58:
Danny Sauer wrote:
Erik wrote regarding '[SLE] NTOP & mysqladmin' on Wed, Nov 03 at 02:05:
Looks like you have a password set up for root on the MySQL server running on localhost, or root has no access from localhost. Try using the "-p" option (after mysqladmin) to specify a password...
--Danny
Hi.
I tried the -p option, and could enter the password. Unfortunately its the same.
Can I avoid the password ?
So, there's a password on the system, but you want to get around it? If I needed to do that, I'd go about it like so: Shut down mysql, if it's running. Change to the mysql data directory - usually /var/lib/mysql - and rename the mysql directory (/var/lib/mysql/mysql) in there to mysql_old. After that, run mysql_install_db to recreate the default access tables. Start mysqld back up and connect to the mysql database, as root, like this: mysql -hlocalhost -uroot mysql_old and run this bit o' SQL UPDATE user SET Password=PASSWORD('newrootpass') WHERE user='root'; where you replace newrootpass with whatever you want the password to be. Set it to '' if you want no password (this is not recommended for anything important). Quit your mysql client, shut down the mysql server process, rename mysql mysql_default, rename mysql_old back to mysql, and start the server back up. You should now have a new password for all users named root. If that's not what you were asking, ask again. :) --Danny, hoping no one malicious read that ;)