Close Menu
Technotification
    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    Technotification
    • Home
    • News
    • How To
    • Explained
    • Facts
    • Lists
    • Programming
    • Security
    • Gaming
    Technotification
    Home › Guides › Install and Configure MySQL Database Server on RHEL

    Install and Configure MySQL Database Server on RHEL

    By Vikram Singh RaoDecember 1, 2015
    Facebook Twitter Reddit LinkedIn
    bl

    Contents

    • Redhat Enterprise Linux (RHEL) Install and Configure MySQL Database Server
      • Red Hat Enterprise Linux install Mysql database server
        • Redhat Enterprise Linux – RHEL 5 / 6 MySQL installation
        • Redhat Enterprise Linux – RHEL 4/3 MySQL installation
        • Start MySQL Service
        • Setup the mysql root password
        • Test the mysql connectivity
        • Configure the mysql server

    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?
                                               

    MySQL



    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 = 1
    query_cache_limit = 1M
    query_cache_size = 32M
     
    You can setup MyISAM buffer size and recover options:
     
    # For MyISAM #
    key_buffer_size = 24M
    myisam_recover = FORCE,BACKUP
     
    Log slow queries for troubleshooting as follows:
     
    # LOGGING #
    log_queries_not_using_indexes = 1
    slow_query_log = 1
    slow_query_log_file = /var/lib/mysql/mysqld-slow-query.log
     
    Set caches and other limits as follows:
     
    tmp_table_size = 32M
    max_heap_table_size = 32M
    max_connections = 500
    thread_cache_size = 50
    open_files_limit = 65535
    table_definition_cache = 4096
    table_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
    Share. Facebook Twitter LinkedIn Tumblr Reddit Telegram WhatsApp
    Vikram Singh Rao
    • Website
    • Facebook
    • X (Twitter)
    • LinkedIn

    I am an entrepreneur at heart who has made his hobby turned a passion, his profession now.

    Related Posts

    Common Cyber Attacks and How to Prevent Them

    July 3, 2024

    Comparing Traditional vs. Digital Metrology Tools

    June 27, 2024

    Microsoft Office 2013 Full Version Free Download (2025)

    January 2, 2025

    How to install Chrome in Ubuntu Linux?

    October 2, 2023

    Tips for Post-Migration Support and Monitoring

    September 16, 2023

    Choosing the right tool for Database Administrator

    August 21, 2023
    Lists You May Like

    10 Best RARBG Alternative Sites in April 2025 [Working Links]

    April 1, 2025

    The Pirate Bay Proxy List in 2025 [Updated List]

    January 2, 2025

    10 Sites to Watch Free Korean Drama [2025 Edition]

    January 2, 2025

    10 Best Torrent Search Engine Sites (2025 Edition)

    February 12, 2025

    10 Best GTA V Roleplay Servers in 2025 (Updated List)

    January 6, 2025

    5 Best Torrent Sites for Software in 2025

    January 2, 2025

    1337x Alternatives, Proxies, and Mirror Sites in 2025

    January 2, 2025

    10 Best Torrent Sites for eBooks in 2025 [Working]

    January 2, 2025

    10 Best Anime Torrent Sites in 2025 [Working Sites]

    January 6, 2025

    Top Free Photo Editing Software For PC in 2025

    January 2, 2025
    Pages
    • About
    • Contact
    • Privacy
    • Careers
    Privacy

    Information such as the type of browser being used, its operating system, and your IP address is gathered in order to enhance your online experience.

    © 2013 - 2025 Technotification | All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.