Install MySQL under Linux

Source: Internet
Author: User
Tags install perl

---restore content starts---

Linux version: CentOS7 64-bit

1. Install package "mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz" now

2. Move the downloaded installation package to/usr/local/.

3. Decompression

MySQL-5.6.33-linux-glibc2.5-x86_64.tar.gz

4. Add System MySQL group and MySQL user

1 MySQL 2 MySQL MySQL

5, modify the current directory owner for the MySQL user

Chown mysql:mysql ./

6. Install the database, there may be errors here.

./scripts/mysql_install_db--user=MySQL

error message :./scripts/mysql_install_db:/usr/bin/perl:bad interpreter:no such file or directory

cause : There are no/usr/bin/perl files or archives.

Workaround : (Install Perl and Perl-devel)

Yum-y Install Perl Perl-devel

error message : FATAL error:please Install the following Perl modules before executing./SCRIPTS/MYSQL_INSTALL_DB:

Data::D umper

Workaround : Install the autoconf Library, install the Data:dumper module when this package is installed

Yum-y Install autoconf

7, modify the current directory owner is the root user

chown -R root:root./

8. Modify the current data directory owner as a MySQL user

Chown mysql:mysql data

============== to this database installation =============

9. Start MySQL service and add boot MySQL service

Add boot start and put the startup script into the boot initialization directory.

CP support-files/MySQL. server/etc/init.d/MySQL

10. Start the MySQL service

MySQL start

Error message:

/etc/init.d/mysql:line 256:my_print_defaults:command not found
/etc/init.d/mysql:line 276:CD:/usr/local/mysql:no such file or directory
Starting MySQL error! Couldn ' t find MySQL server (/usr/local/mysql/bin/mysqld_safe)

==========

/usr/local/mysql-5.6.33-linux-glibc2.5-x86_64

---restore content ends---

Install MySQL under Linux

Related Article

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.