Linux installation MySQL Database

Source: Internet
Author: User

Tagged with: Data default IMA-Data local Linux installation tar.gz MYSQ star

  1. Download MySQL compiled binary installation package to MySQL website.

  2. Unzip the 32-bit installation package:

    Go to the directory where the installation package is located, execute the command: Tar mysql-5.6.17-linux-glibc2.5-i686.tar.gz

  3. Copy the extracted MySQL directory to the local software directory of the system:

    Execute command: CP mysql-5.6.17-linux-glibc2.5-i686/usr/local/mysql-r

    Note: The end of the directory does not add/

  4. Add system MySQL Group and MySQL User:

    Execute command: Groupadd MySQL and useradd-r-g MySQL MySQL

  5. To install the database:

    Go to install MySQL software directory: Execute command cd/usr/local/mysql

    Modify current directory owner for MySQL User: Execute command chown-r mysql:mysql.

    Install database: Executes the command./scripts/mysql_install_db--user=mysql

    Modify the current directory owner as root User: Execute command chown-r root:root.

    Modify the current data directory owner for MySQL User: Execute command chown-r mysql:mysql data

    To this database installation is complete

  6. Start the MySQL service and add the boot MySQL service:

    Add Boot: Execute command CP Support-files/mysql.server/etc/init.d/mysql, put startup script into boot initialization directory

    Start MySQL service: Execute command service MySQL start

    Execute command: ps-ef|grep mysql see MySQL service description started successfully,

  7. To modify the root user password of MySQL, the root initial password is empty:

    Execute command:./bin/mysqladmin-u root password ' password '

  8. Put the MySQL client on the default path:

    Ln-s/usr/local/mysql/bin/mysql/usr/local/bin/mysql

    Note: It is recommended to use the soft chain in the past, do not directly package file copy, easy to install multiple versions of MySQL system

    Original link: https://jingyan.baidu.com/article/a378c9609eb652b3282830fd.html

Linux installation MySQL Database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.