Cài đặt luồng mysql centos 8
Ngày đăng:
08/01/2023
Trả lời:
0
Lượt xem:
165
CentOS Linux 8 không còn được hỗ trợ và các kho lưu trữ đã bị xóa. Bạn cần phải di chuyển đến một cái gì đó khác. Có các bản dựng lại khác của RHEL 8, một số/được liệt kê nhiều nhất trong chữ ký của tôi bên dưới. Hoặc bạn có thể chuyển sang Luồng, đây là bản beta luân phiên của bản phát hành điểm tiếp theo của RHEL Show mysql_secure_installation Securing the MySQL server deployment. Connecting to MySQL using a blank password. VALIDATE PASSWORD COMPONENT can be used to test passwords and improve security. It checks the strength of password and allows the users to set only those passwords which are secure enough. Would you like to setup VALIDATE PASSWORD component? # enable password validation policy or not Press y|Y for Yes, any other key for No: y There are three levels of password validation policy: LOW Length >= 8 MEDIUM Length >= 8, numeric, mixed case, and special characters STRONG Length >= 8, numeric, mixed case, special characters and dictionary file # select password validation policy if enabled Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0 Please set the password for root here. # set MySQL root password New password: Re-enter new password: # confirmation of the password you input Estimated strength of the password: 100 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL 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 or not Remove anonymous users? (Press y|Y for Yes, any other key for No) : 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 or not Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y Success. By default, MySQL 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 or not Remove test database and access to it? (Press y|Y for Yes, any other key for No) : 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 or not Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y Success. All done! # kết nối với MySQL bằng root [root@www ~]# Nhập mật khẩu. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 12 Server version: 8.0.21 Source distribution Copyright (c) 2000, 2020, 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. # show user list mysql> select user,host from mysql.user; +------------------+-----------+ | user | host | +------------------+-----------+ | mysql.infoschema | localhost | | mysql.session | localhost | | mysql.sys | localhost | | root | localhost | +------------------+-----------+ 4 rows in set (0.00 sec) # show database list mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 4 rows in set (0.01 sec) # create test database mysql> create database test_database; Query OK, 1 row affected (0.11 sec) # create test table on test database mysql> create table test_database.test_table (id int, name varchar(50), address varchar(50), primary key (id)); Query OK, 0 rows affected (0.42 sec) # insert data to test table mysql> insert into test_database.test_table(id, name, address) values("001", "CentOS", "Hiroshima"); Query OK, 1 row affected (0.04 sec) # show test table mysql> select * from test_database.test_table; +----+--------+-----------+ | id | name | address | +----+--------+-----------+ | 1 | CentOS | Hiroshima | +----+--------+-----------+ 1 row in set (0.00 sec) # delete test database mysql> drop database test_database; Query OK, 1 row affected (0.27 sec) mysql> exit Bye[root@www ~]# mysql_secure_installation Securing the MySQL server deployment. Connecting to MySQL using a blank password. VALIDATE PASSWORD COMPONENT can be used to test passwords and improve security. It checks the strength of password and allows the users to set only those passwords which are secure enough. Would you like to setup VALIDATE PASSWORD component? # enable password validation policy or not Press y|Y for Yes, any other key for No: y There are three levels of password validation policy: LOW Length >= 8 MEDIUM Length >= 8, numeric, mixed case, and special characters STRONG Length >= 8, numeric, mixed case, special characters and dictionary file # select password validation policy if enabled Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0 Please set the password for root here. # set MySQL root password New password: Re-enter new password: # confirmation of the password you input Estimated strength of the password: 100 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL 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 or not Remove anonymous users? (Press y|Y for Yes, any other key for No) : 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 or not Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y Success. By default, MySQL 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 or not Remove test database and access to it? (Press y|Y for Yes, any other key for No) : 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 or not Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y Success. All done! # kết nối với MySQL bằng root [root@www ~]# Nhập mật khẩu. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 8.0.28 Source distribution Copyright (c) 2000, 2022, Oracle and/or its affiliates. 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. # show user list mysql> select user,host from mysql.user; +------------------+-----------+ | user | host | +------------------+-----------+ | mysql.infoschema | localhost | | mysql.session | localhost | | mysql.sys | localhost | | root | localhost | +------------------+-----------+ 4 rows in set (0.00 sec) # show database list mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 4 rows in set (0.00 sec) # create test database mysql> create database test_database; Query OK, 1 row affected (0.11 sec) # create test table on test database mysql> create table test_database.test_table (id int, name varchar(50), address varchar(50), primary key (id)); Query OK, 0 rows affected (0.42 sec) # insert data to test table mysql> insert into test_database.test_table(id, name, address) values("001", "CentOS", "Hiroshima"); Query OK, 1 row affected (0.04 sec) # show test table mysql> select * from test_database.test_table; +----+--------+-----------+ | id | name | address | +----+--------+-----------+ | 1 | CentOS | Hiroshima | +----+--------+-----------+ 1 row in set (0.00 sec) # delete test database mysql> drop database test_database; Query OK, 1 row affected (0.27 sec) mysql> exit Bye Làm cách nào để cài đặt MySQL trong luồng CentOS 8?Trên CentOS 8, MySQL phiên bản 8 có sẵn từ kho lưu trữ mặc định. Chạy lệnh sau để cài đặt gói máy chủ mysql và một số phụ thuộc của nó. sudo dnf cài đặt máy chủ mysql .
Cách cài đặt MySQL 8. 0 21 trên CentOS 8?Cách cài đặt MySQL 8. 0 trên CentOS/RHEL 8 . Bước 1 – Cài đặt MySQL. Các gói MySQL 8 có sẵn trong kho AppStrem trong CentOS 8. . Bước 2 – Cài đặt MySQL an toàn. Quá trình cài đặt MySQL đã hoàn tất. . Bước 3 – Kết nối MySQL. . Bước 4 – Tạo cơ sở dữ liệu và người dùng Làm cách nào để cài đặt MySQL trên Linux 8?Bước 1. Kích hoạt kho lưu trữ MySQL Bước 2. Cài đặt kho lưu trữ MySQL Bước 3. Làm mới kho lưu trữ Bước 4. Cài đặt MySQL Bước 5. Thiết lập Bảo mật MySQL. Xác thực plugin mật khẩu. Thay đổi mật khẩu gốc. Định cấu hình Bảo mật MySQL Bước 6. Bắt đầu, Dừng hoặc Kiểm tra Trạng thái của Dịch vụ MySQL Bước 7. Khởi chạy MySQL để nhập lệnh Cách cài đặt MySQL 5. 6 trên CentOS 8?Đi tới Dịch vụ, trong mô-đun điện toán, nhấp vào Dịch vụ EC2 để mở. . Khởi chạy máy chủ MySQL Kết nối với phiên bản Linux EC2 bằng PuTTY Chuyển sang người dùng root Cài đặt bản cập nhật máy chủ Cài đặt gói wget Tải xuống 5. 6 nhị phân (rpm) Cài đặt 5. 6 nhị phân (rpm) Cài đặt máy chủ MySQL 5. 6 |