您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息
三六零分类信息网 > 来宾分类信息网,免费分类信息发布

AlmaLinux9怎么安装MySQL 8.0.32

2024/8/13 23:28:53发布257次查看
1、配置安装源# 安装dnf install http://mirrors.ustc.edu.cn/mysql-repo/mysql80-community-release-el9.rpm -y # 修改配置sed -i 's@http://repo.mysql.com/@http://mirrors.ustc.edu.cn/mysql-repo/@g' /etc/yum.repos.d/mysql-community*.repo
2、安装mysqldnf install -y mysql-community-server
3、配置mysqlif [ ! "$(cat /usr/bin/mysqld_pre_systemd | grep -v ^\# | grep initialize-insecure )" ]; then sed -i "s@--initialize @--initialize-insecure @g" /usr/bin/mysqld_pre_systemdfi
4、修改配置文件[client]port = 3306socket = /var/lib/mysql/mysql.sockdefault-character-set = utf8mb4 [mysql]prompt="mysql [\d]> "no-auto-rehash [mysqld]port = 3306socket = /var/lib/mysql/mysql.sockdefault_authentication_plugin = mysql_native_password datadir = /var/lib/mysqlpid-file = /var/lib/mysql/mysql.piduser = mysqlbind-address = 0.0.0.0server-id = 1 init-connect = 'set names utf8mb4'character-set-server = utf8mb4collation-server = utf8mb4_0900_ai_ci skip-name-resolve#skip-networkingback_log = 300 max_connections = 5295max_connect_errors = 6000open_files_limit = 65535table_open_cache = 1024max_allowed_packet = 500mbinlog_cache_size = 1mmax_heap_table_size = 8mtmp_table_size = 128m read_buffer_size = 2mread_rnd_buffer_size = 8msort_buffer_size = 8mjoin_buffer_size = 8mkey_buffer_size = 256m thread_cache_size = 64 ft_min_word_len = 4 log_bin = mysql-binbinlog_format = rowbinlog_expire_logs_seconds = 604800 log_error = /var/lib/mysql/mysql-error.logslow_query_log = 1long_query_time = 1slow_query_log_file = /var/lib/mysql/mysql-slow.log performance_schema = 0explicit_defaults_for_timestamp lower_case_table_names = 1 skip-external-locking default_storage_engine = innodb#default-storage-engine = myisaminnodb_file_per_table = 1innodb_open_files = 500innodb_buffer_pool_size = 1024minnodb_write_io_threads = 4innodb_read_io_threads = 4innodb_thread_concurrency = 0innodb_purge_threads = 1innodb_flush_log_at_trx_commit = 2innodb_log_buffer_size = 2minnodb_log_file_size = 32minnodb_log_files_in_group = 3innodb_max_dirty_pages_pct = 90innodb_lock_wait_timeout = 120 bulk_insert_buffer_size = 8mmyisam_sort_buffer_size = 64mmyisam_max_sort_file_size = 10g interactive_timeout = 28800wait_timeout = 28800 binlog_rows_query_log_events = 1log_bin_trust_function_creators = 1log_timestamps = system sql_mode = strict_trans_tables,no_zero_in_date,no_zero_date,error_for_division_by_zero,no_engine_substitution#sql_mode = no_auto_value_on_zeroinnodb_strict_mode = 0plugin-load=mysql_clone.so [mysqldump]quickmax_allowed_packet = 500m [myisamchk]key_buffer_size = 256msort_buffer_size = 8mread_buffer = 4mwrite_buffer = 4m
5、启动mysqlsystemctl enable --now mysqld
6、安全配置# mysql_secure_installationmysql_secure_installation: [error] unknown variable 'default-character-set=utf8mb4'.securing the mysql server deployment.connecting to mysql using a blank password.the 'validate_password' component is installed on the server.the subsequent steps will run with the existing configurationof the component.please set the password for root here.new password: #输入密码re-enter new password: #输入密码estimated strength of the password: 100do you wish to continue with the password provided?(press y|y for yes, any other key for no) : yby default, a mysql installation has an anonymous user,allowing anyone to log into mysql without having to havea user account created for them. this is intended only fortesting, and to make the installation go a bit smoother.you should remove them before moving into a productionenvironment.remove anonymous users? (press y|y for yes, any other key for no) : ysuccess.normally, root should only be allowed to connect from'localhost'. this ensures that someone cannot guess atthe root password from the network. disallow root login remotely? (press y|y for yes, any other key for no) : ysuccess.by default, mysql comes with a database named 'test' thatanyone can access. this is also intended only for testing,and should be removed before moving into a productionenvironment.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 changesmade so far will take effect immediately.reload privilege tables now? (press y|y for yes, any other key for no) : ysuccess.all done!
以上就是almalinux9怎么安装mysql 8.0.32的详细内容。
来宾分类信息网,免费分类信息发布

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录