기본 콘텐츠로 건너뛰기

설치,삭제, MySQL(Maria DB) root 계정 외부접속 허용

모든 패지지 목록

/var/lib/dpkg/status

DB 삭제


apt-get autoremove --purge mariadb-server
rm -rf /var/lib/mysql
rm -rf /etc/mysql

설치

apt-get install mariadb-server

외부 접속 설정

mysql -u root -p
use mysql
grant all privileges on *.* to 'root'@'%' identified by 'password';
flush privileges;

파일 위치 보기

show variables like 'datadir';

mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bak
mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bak

error...
    error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'
    neo@thematrix:~$ sudo cat /etc/mysql/debian.cnf
The contents of the file should look something like the following:
    # Automatically generated for Debian scripts. DO NOT TOUCH!
    [client]
    host     = localhost
    user     = debian-sys-maint
    password = n4aSHUP04s1J32X5
    socket   = /var/run/mysqld/mysqld.sock
    [mysql_upgrade]
    user     = debian-sys-maint
    password = n4aSHUP04s1J32X5
    socket   = /var/run/mysqld/mysqld.sock
    basedir  = /usr
See that password?  That’s what we’re looking for!
Next, we want to issue a command to MySQL that tells it to grant the debian-sys-maint user all necessary privileges using the new password.
Login to your mysql server using your root account and the root password you had originally set:
    neo@thematrix:~$ mysql -u root -p
Issue the GRANT command now to grant those permissions:
    mysql> GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'n4aSHUP04s1J32X5';
Voila!  If you restart MySQL, you’ll find that you should no longer be getting the “access denied” error message.
    neo@thematrix:~$ sudo /etc/init.d/mysql restart
    * Stopping MySQL database server mysqld [ OK ]
    * Starting MySQL database server mysqld [ OK ]
    * Checking for corrupt, not cleanly closed and upgrade needing tables.

댓글

이 블로그의 인기 게시물

UltraEdit Professional Version 18.20.0.1014 라이센스 키 넣기

Step 1: unpack rar archive      Step 2: run the setup   Step 3: Use the given keygen to activate    Add the line   127.0.0.1 licensing.ultraedit.com         to your %WINDOWS%\system32\drivers\etc\hosts file                 Enter any data for license-id and password (license-id must be a         number)                 Choose Offline activation and generate corresponding activation         codes for your user codes   Step 4: Enjoy and Support Developers, Buy It, They Deserved It!

dmesg 메시지 실시간으로 보기

참조사이트 http://imitator.kr/Linux/556 # tail -f /var/log/messages # tail -f |dmesg //기본 2초 단위로 갱신 된다. # watch "dmesg | tail -f" //1초 단위로 갱신하면서 보여준다. # watch -n 1 "dmesg | tail -f" // 보여주는 줄을 20으로 늘린다. (기본 10줄) # watch -n 1 "dmesg | tail -f -n 20"