RHEL 上 MySQL安装与配置
来源:互联网 发布:淘宝流量和访客数 编辑:程序博客网 时间:2024/06/05 19:10
Redhat Enterprise Linux (RHEL) Install and Configure MySQL Database Server
How do I install the MySQL database server under Redhat Enterprise Linux 4 / 5 / 6?
You can install mysql using any one of the following medium.
a) Install MySQL package using RHN or CentOS repo.
b) Install MySQL rpms from CD/DVD media.
Red Hat Enterprise Linux install Mysql database server
Type the following command to install mysql server using the RHN or CentOS repo:
Redhat Enterprise Linux - RHEL 5 / 6 MySQL installation
Type the following command as root user:# yum install mysql-server mysql
Redhat Enterprise Linux - RHEL 4/3 MySQL installation
Type the following command as root user:# up2date mysql-server mysql
Start MySQL Service
To start the mysql server type the following command:# chkconfig mysqld on
# /etc/init.d/mysqld start
Setup the mysql root password
Type the following command to setup a password for root user:# mysqladmin -u root password NEWPASSWORD
Test the mysql connectivity
Type the following command to connect to MySQL server:$ mysql -u root -p
Configure the mysql server
Edit /etc/my.cnf, enter (please note that following are sample values, you need to adjust them as per your requirements):# vi /etc/my.cnf
You can configure mysql query cache as follows (add in [mysqld] section) to speed up mysql:
query_cache_type = 1query_cache_limit = 1Mquery_cache_size = 32M
You can setup MyISAM buffer size and recover options:
# For MyISAM #key_buffer_size = 24Mmyisam_recover = FORCE,BACKUP
Log slow queries for troubleshooting as follows:
# LOGGING #log_queries_not_using_indexes = 1slow_query_log = 1slow_query_log_file = /var/lib/mysql/mysqld-slow-query.log
Set caches and other limits as follows:
tmp_table_size = 32Mmax_heap_table_size = 32Mmax_connections = 500thread_cache_size = 50open_files_limit = 65535table_definition_cache = 4096table_open_cache = 512
Save and close the file. You can reload or restart the changes as follows:# /sbin/service mysqld restart
OR# /sbin/service mysqld reload
- RHEL 上 MySQL安装与配置
- VNC Server 在SUSE/RHEL上的安装与配置
- Bugzilla安装配置(Rhel+Apache+MySQL)
- RHEL/CentOS中vsftp安装与配置
- Oracle10g/11g 在SUSE/RHEL上的安装与配置
- rhel上配置rsync
- Mac上安装MySql与简单配置
- 在RHEL 5上安装并配置iSCSI Initiator软件
- .RHEL 6上KVM的安装配置及使用 网桥
- 在RHEL 5平台上安装配置arm-linux-gcc
- 在RHEL 7上安装和配置kubernetes
- rhel linux 安装MySQL
- RHEL 安装配置
- VMware下RHEL配置网络、安装JDK和MySQL
- 在RHEL上配置网卡
- Centos / RHEL下code blocks wxWidgets安装与配置
- Centos / RHEL下code blocks wxWidgets安装与配置
- rhel 下docker的安装配置与使用
- log4net使用详解
- js - 字符串替换
- 展讯
- Perform,SendMessage,PostMessage
- 单独调用使用ueditor上传控件配置方法:
- RHEL 上 MySQL安装与配置
- 一个离职员工对中兴的回望
- Android跨平台移植经验之谈
- [Android实例] Android网络收音机项目(内含源码)
- Thirft框架介绍
- linux下编译libjingle源码——android移植
- cp和mv对文件和链接影响的区别
- 目标检测的图像特征提取之(三)Haar特征
- 中兴V889DRoot后可删和不可删