Home > Database > Mysql Tutorial > body text

What is the command to install MySQL under Linux?

PHPz
Release: 2023-05-31 20:58:25
forward
1885 people have browsed it

What is the command to install MySQL under Linux?

  • MySQL installation

    The system platform for this tutorial: CentOS release 6.6 (Final) 64-bit.

    1. Install compilation tools and library files

    yum -y install gcc gcc-c++ make autoconf libtool-ltdl-devel gd-devel freetype-devel libxml2-devel libjpeg-devel libpng-devel openssl-devel curl-devel bison patch unzip libmcrypt-devel libmhash-devel ncurses-devel sudo bzip2 flex libaio-devel
    Copy after login

    2. Install cmake compiler

    cmake version: cmake-3.1.1.

    1. Download address:

    $ wget http://www.cmake.org/files/v3.1/cmake-3.1.1.tar.gzmysql1
    Copy after login

    2. Unzip the installation package

    $ tar zxvf cmake-3.1.1.tar.gz
    Copy after login

    3. Enter the installation package Directory

    $ cd cmake-3.1.1
    Copy after login

    4. Compile and install

    $ ./bootstrap
    $ make && make install
    Copy after login

    3. Install MySQL

    MySQL version: mysql-5.6.15.

    1. Download address:

    $ wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.15.tar.gzmysql2
    Copy after login

    2. Unzip the installation package

    $ tar zxvf mysql-5.6.15.tar.gz
    Copy after login

    3. Enter the installation package Directory

    $ cd mysql-5.6.15
    Copy after login

    4. Compile and install

    $ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/webserver/mysql/ -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=all -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DWITH_INNODB_MEMCACHED=1 -DWITH_DEBUG=OFF -DWITH_ZLIB=bundled -DENABLED_LOCAL_INFILE=1 -DENABLED_PROFILING=ON -DMYSQL_MAINTAINER_MODE=OFF -DMYSQL_DATADIR=/usr/local/webserver/mysql/data -DMYSQL_TCP_PORT=3306
    $ make && make install
    Copy after login

    5. Check the mysql version:

    $ /usr/local/webserver/mysql/bin/mysql --versionmysql3
    Copy after login

    This is it. mysql installation is complete.

The above is the detailed content of What is the command to install MySQL under Linux?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!