티스토리 뷰
root@freecatz-pe-kr:~# uname -a
freecatz-pe-kr 3.2.0-6-amd64 #1 SMP Debian 3.2.101-1 x86_64 GNU/Linux
root@freecatz-pe-kr:~# mysql --version
mysql Ver 14.14 Distrib 5.5.47, for debian-linux-gnu (x86_64) using readline 6.2
root@freecatz-pe-kr:~# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
root@freecatz-pe-kr:~# /etc/init.d/mysqld stop
root@freecatz-pe-kr:~# mysqld_safe --skip-grant-tables &
[1] 14961
190717 10:39:40 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect.
190717 10:39:40 mysqld_safe Logging to '/home/mysql/log/mysql-err.log'.
190717 10:39:40 mysqld_safe Starting mysqld daemon with databases from /home/mysql/data
root@freecatz-pe-kr:~# mysql -u root mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.47-0+deb7u1 (Debian)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select user, host, password from user;
+------------------+-----------+-------------------------------------------+
| user | host | password |
+------------------+-----------+-------------------------------------------+
| debian-sys-maint | localhost | ...비밀번호... |
| freecatz | % | ...비밀번호... |
+------------------+-----------+-------------------------------------------+
2 rows in set (0.00 sec)
* 조금 전에 mysql-server 를 설치 했는데, root 계정이 보이지 않는다. 이유는 모르겠다.
mysql> insert into user (Host, User, Password) values ('localhost', 'root', password('비밀번호'));
mysql> insert into user (Host, User, Password) values ('%', 'root', password('비밀번호'));
mysql> flush privileges;
mysql> quit;
Bye
root@freecatz-pe-kr:~# /etc/init.d/mysql stop
[....] Stopping MySQL database server: mysqld190717 10:49:53 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
. ok
[1]+ Done mysqld_safe --skip-grant-tables
root@freecatz-pe-kr:~# /etc/init.d/mysql start
[ ok ] Starting MySQL database server: mysqld ..
[info] Checking for tables which need an upgrade, are corrupt or were
not closed cleanly..
root@freecatz-pe-kr:~# mysql -u root -p mysql
Enter password:
mysql> grant all privileges on *.* to root@localhost with grant option;
mysql> grant all privileges on *.* to root@'%' with grant option;
mysql> flush privileges;
mysql> quit;
Bye
- Total
- Today
- Yesterday
- kotlin
- samba
- Compile
- place
- Review
- ssh
- MySQL
- devel
- Android
- food
- devtools
- Flutter
- Mobile
- JavaScript
- springboot
- Spring
- gpkiapi
- Linux
- TIP
- Java
- Security
- web
- HTTP
- Fun
- SSL
- json parse
- development
- dart
- 엘리스센터
- 맛집
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |