Hi. On my 9.1 system I'm trying to set up NTOP. If I run mysqladmin, I get this: mysqladmin create NTOP mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: 'root@localhost' (Using password: NO)' Is it a permission problem, and if, how can I tackle it, and where ? -- venlig hilsen - best regards Erik Jakobsen
Erik wrote regarding '[SLE] NTOP & mysqladmin' on Wed, Nov 03 at 02:05:
Hi.
On my 9.1 system I'm trying to set up NTOP.
If I run mysqladmin, I get this:
mysqladmin create NTOP
mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: 'root@localhost' (Using password: NO)'
Is it a permission problem, and if, how can I tackle it, and where ?
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
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 ? /Erik
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 ;)
Hi Danny. I started with yor suggestion. Closed the mysql. Then mysql_install_db: ysql_install_db Preparing db table Preparing host table Preparing user table Preparing func table Preparing tables_priv table Preparing columns_priv table Installing all prepared tables 041104 7:18:10 /usr/sbin/mysqld: Shutdown Complete PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h lajka3.urbakken.dk password 'new-password' See the manual for more instructions. You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; perl run-all-tests Please report any problems with the /usr/bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at https://order.mysql.com I tried to start mysql again, but had no luck: # rcmysql start Starting service MySQL failed The directory as it looks after the renaming and start of mysql_install_db: drwxr-xr-x 5 mysql daemon 320 Nov 4 07:21 . drwxr-xr-x 54 root root 1408 Nov 3 07:05 .. drwx------ 2 root root 528 Nov 4 07:18 mysql drwx------ 2 mysql root 528 Oct 30 16:30 mysql_old -rw-rw---- 1 mysql root 810 Nov 4 07:19 mysqld.log -rw-r--r-- 1 root root 131 Oct 31 04:16 mysqld.log-20041031.gz -rw-r--r-- 1 root root 223 Nov 1 05:31 mysqld.log-20041101.gz -rw-r--r-- 1 root root 146 Nov 2 06:00 mysqld.log-20041102.gz -rw-r--r-- 1 root root 148 Nov 3 07:01 mysqld.log-20041103.gz drwx------ 2 mysql root 48 Oct 30 16:30 test What is wrong ? -- Mvh Erik
Erik wrote regarding 'Re: [SLE] NTOP & mysqladmin' on Thu, Nov 04 at 00:29:
Hi Danny.
I started with yor suggestion. [...] The directory as it looks after the renaming and start of mysql_install_db:
drwxr-xr-x 5 mysql daemon 320 Nov 4 07:21 . drwxr-xr-x 54 root root 1408 Nov 3 07:05 .. drwx------ 2 root root 528 Nov 4 07:18 mysql drwx------ 2 mysql root 528 Oct 30 16:30 mysql_old -rw-rw---- 1 mysql root 810 Nov 4 07:19 mysqld.log -rw-r--r-- 1 root root 131 Oct 31 04:16 mysqld.log-20041031.gz -rw-r--r-- 1 root root 223 Nov 1 05:31 mysqld.log-20041101.gz -rw-r--r-- 1 root root 146 Nov 2 06:00 mysqld.log-20041102.gz -rw-r--r-- 1 root root 148 Nov 3 07:01 mysqld.log-20041103.gz drwx------ 2 mysql root 48 Oct 30 16:30 test
What is wrong ?
Permissions. Try chown -R mysql:mysql /var/lib/mysql and it'll likely work. --Danny
participants (2)
-
Danny Sauer
-
Erik Jakobsen