우분투 08.04에 mtop 설치

우분투 08.04에 mtop 설치

우분투 8.04에 mtop을 설치 중입니다. MySQL이 실행 중입니다.

설치 과정에서 다음과 같은 메시지가 나타납니다.

Access denied for user 'root'@'localhost' (using password: NO)

(아래 참조)

어떻게든 unix 사용자 루트에서 mysql 계정 루트로의 액세스를 허용해야 한다고 생각합니까?

올바른 단계는 무엇입니까?

$ sudo aptitude install mtop
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Building tag database... Done      
The following NEW packages will be automatically installed:
  libcurses-perl 
The following packages have been kept back:
  linux-image-server linux-server pm-utils 
The following NEW packages will be installed:
  libcurses-perl mtop 
0 packages upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 0B/168kB of archives. After unpacking 664kB will be used.
Do you want to continue? [Y/n/?] y
Writing extended state information... Done
Preconfiguring packages ...
Selecting previously deselected package libcurses-perl.
(Reading database ... 36744 files and directories currently installed.)
Unpacking libcurses-perl (from .../libcurses-perl_1.13-1_i386.deb) ...
Selecting previously deselected package mtop.
Unpacking mtop (from .../mtop_0.6.6-1.2_all.deb) ...
Setting up libcurses-perl (1.13-1) ...
Setting up mtop (0.6.6-1.2) ...
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
dpkg: error processing mtop (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 mtop
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up mtop (0.6.6-1.2) ...
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
dpkg: error processing mtop (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 mtop
Reading package lists... Done             
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Writing extended state information... Done
Building tag database... Done             

편집하다:mytop런치패드에서 버그 보고서를 읽은 후 이전 우분투 버전에서 유사한 도구를 사용하기로 결정했습니다 .

답변1

먼저 루트 계정을 사용하여 mysql 클라이언트를 시작하십시오.

mysql -u root -p

루트 비밀번호를 제거하는 것보다로컬호스트권한을 플러시합니다.

UPDATE mysql.user SET Password=PASSWORD('') WHERE User='root' AND Host='localhost';FLUSH PRIVILEGES;

이제 mtop을 설치하십시오. 예를 들면 다음과 같습니다.

sudo aptitude install mtop

설치 후 비밀번호를 이전 비밀번호로 다시 설정하세요.

UPDATE mysql.user SET Password=PASSWORD('oldpassword') WHERE User='root' AND Host='localhost';FLUSH PRIVILEGES;

@제임스로리: 명령에 비밀번호를 직접 제공하지 않는 것이 좋습니다. -p만 사용하면 비밀번호를 묻는 메시지가 표시되어 비밀번호가 쉘 기록에 기록되지 않습니다. 5.3.2.2를 참조하세요. 비밀번호 보안에 대한 최종 사용자 지침

@제임스로리: localhost에 대한 액세스만 지정하면 보안 측면이 향상됩니다. 귀하의 예에서는'%'이는 가능하게 할 것입니다원격비밀번호 없이 루트 접근 가능!

결국에는 이 버그를 수정하는 것이 최선의 접근 방식이 될 것입니다.https://bugs.launchpad.net/ubuntu/+source/mtop/+bug/77980

답변2

이 버그는 몇 가지 해결 방법과 대체(PPA) 패키지에 대해 설명합니다.

https://bugs.launchpad.net/ubuntu/+source/mtop/+bug/77980

답변3

이 문제를 해결하는 해키적이고 끔찍한 방법 중 하나는 먼저 localhost의 MySQL 루트 비밀번호를 제거한 다음 다시 추가하는 것입니다.
mysql -u root -pwhatever
UPDATE user SET Password=PASSWORD('') WHERE User='root' AND Host='%';
프로그램 설치
UPDATE user SET Password=PASSWORD('whatever') WHERE User='root' AND Host='%';
일단 설치되면 로그인 세부 정보가 포함된 구성 파일이 어딘가에 있어야 합니다.

관련 정보