http://iotn.co.kr 연락처: gilho.kr@gmail.com [ The Japanese government should apologize to Japanese Military Sexual Slavery victim. / 日本政府は日本軍の性的奴隷?牲者に謝罪すべき. ]

사용자

ID:
PW:

INDEX
01.게시판
게시판 [69]
02.File Book
File 자료실 [95]
Site Link [18]
개인폴더 [194]
03.Field Book
Altibase [19]
Tibero [30]
MS-SQL [18]
MySQL [40]
DB2 [79]
ORACLE [2888]
PostgreSQL [103]
기타정보 [150]
운영체제 [577]
04.Q/A Book
Q/A [53]
05.방명록
방명록 [54]
레벨업 [37]
구인/구직 [2]

기념일
Search
LINK
+ 가족 Hompy
+ DNSEver
IOTN :: Work Book :: MySQL

 회원가입

mariadb 10.5.6 [ root password / 초기화 / without password ]
최길호 [LIST]   2020-11-05 10:38:25, 조회 : 311

[root@localhost mariadb]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.5.6-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show variables like 'vali%';
Empty set (0.003 sec)

MariaDB [(none)]> select user,host,Password,plugin,authentication_string from mysql.user;
+-------------+-----------------------+----------+-----------------------+-----------------------+
| User        | Host                  | Password | plugin                | authentication_string |
+-------------+-----------------------+----------+-----------------------+-----------------------+
| mariadb.sys | localhost             |          | mysql_native_password |                       |
| root        | localhost             | invalid  | mysql_native_password | invalid               |
| mysql       | localhost             | invalid  | mysql_native_password | invalid               |
|             | localhost             |          |                       |                       |
|             | localhost.localdomain |          |                       |                       |
+-------------+-----------------------+----------+-----------------------+-----------------------+
5 rows in set (0.004 sec)

MariaDB [(none)]>

Password , authentication_string  암호를 바꾸고 다시 invalid로 바꾸는 방법
MariaDB [(none)]> alter USER root@localhost IDENTIFIED VIA mysql_native_password USING password('verystrongpassword');
Query OK, 0 rows affected (0.027 sec)

MariaDB [(none)]> select user,host,Password,plugin,authentication_string from mysql.user;
+-------------+-----------------------+-------------------------------------------+-----------------------+-------------------------------------------+
| User        | Host                  | Password                                  | plugin                | authentication_string                     |
+-------------+-----------------------+-------------------------------------------+-----------------------+-------------------------------------------+
| mariadb.sys | localhost             |                                           | mysql_native_password |                                           |
| root        | localhost             | *F51D95E798A16FF9AC14C785C06B44AF22BA4EC7 | mysql_native_password | *F51D95E798A16FF9AC14C785C06B44AF22BA4EC7 |
| mysql       | localhost             | invalid                                   | mysql_native_password | invalid                                   |
|             | localhost             |                                           |                       |                                           |
|             | localhost.localdomain |                                           |                       |                                           |
+-------------+-----------------------+-------------------------------------------+-----------------------+-------------------------------------------+
5 rows in set (0.002 sec)

MariaDB [(none)]> show variables like '%passw%';
+------------------------------------+-----------------------------+
| Variable_name                      | Value                       |
+------------------------------------+-----------------------------+
| cracklib_password_check_dictionary | /usr/share/cracklib/pw_dict |
| default_password_lifetime          | 0                           |
| disconnect_on_expired_password     | OFF                         |
| max_password_errors                | 4294967295                  |
| old_passwords                      | OFF                         |
| report_password                    |                             |
| strict_password_validation         | ON                          |
+------------------------------------+-----------------------------+
7 rows in set (0.003 sec)



[root@localhost mariadb]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.

Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Enter current password for root (enter for none): [ 정확한 암호를 넣야 한다. ]
OK, successfully used password, moving on...

Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.

You already have your root account protected, so you can safely answer 'n'.

Switch to unix_socket authentication [Y/n] y
Enabled successfully!
Reloading privilege tables..
... Success!


You already have your root account protected, so you can safely answer 'n'.

Change the root password? [Y/n] y
New password:
Re-enter new password: [ 엔터,스페이스, 모두 에러나고 ]
Sorry, you can't use an empty password here.

New password: [ Ctrl+C ]
Aborting!


Cleaning up...
[root@localhost mariadb]#
[root@localhost mariadb]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.

Enter current password for root (enter for none): [ Enter : 이제 암호 없이 로그인 된다. ]
OK, successfully used password, moving on...

Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.

You already have your root account protected, so you can safely answer 'n'.

Switch to unix_socket authentication [Y/n] y
Enabled successfully!
Reloading privilege tables..
... Success!


You already have your root account protected, so you can safely answer 'n'.

Change the root password? [Y/n] n
... skipping.

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!
[root@localhost mariadb]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 16
Server version: 10.5.6-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> select user,host,Password,plugin,authentication_string from mysql.user;
+-------------+-----------+----------+-----------------------+-----------------------+
| User        | Host      | Password | plugin                | authentication_string |
+-------------+-----------+----------+-----------------------+-----------------------+
| mariadb.sys | localhost |          | mysql_native_password |                       |
| root        | localhost | invalid  | mysql_native_password | invalid               |
| mysql       | localhost | invalid  | mysql_native_password | invalid               |
+-------------+-----------+----------+-----------------------+-----------------------+
3 rows in set (0.002 sec)

MariaDB [(none)]>




  LIST

Copyright 1999-2022 Zeroboard / skin by 최길호(gilho.kr@gmail.com)
최근 댓글
2008/12/15
MySQL이 안좋은건가? 장애도 쉽게 나고,...
by 최길호
최근 게시물
06/29
[ORACLE]
DDE: Problem Key 'ORA 600 [133....
by 최길호
06/25
[ORACLE]
Replication may not be valid i....
by 최길호
06/22
[운영체제]
CentOS7 홈페이지 Migration 메모.
by 최길호