MySQL installation under Linux

Source: Internet
Author: User

1. Download

: Http://dev.mysql.com/downloads/mysql/5.6.html#downloads

Download version: I choose here 5.6.33, General edition, Linux under 64-bit

You can also directly copy the 64-bit, download by command: wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz

2. Decompression

#解压tar-zxvf mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz# Copy the extracted MySQL directory cp-r mysql-5.6.33-linux-glibc2.5-x86_64/usr/ Local/mysql

3. Adding user groups and users

#添加用户组groupadd mysql# Add user MySQL to user group mysqluseradd-g MySQL MySQL

4. Installation

cd/usr/local/mysql/<br>mkdir/data/mysqlchown-r mysql:mysql././scripts/ mysql_install_db--user=mysql--DATADIR=/USR/LOCAL/MYSQL/DATA/MYSQLCP support-files/mysql.server/etc/init.d/ Mysqldchmod 755/ETC/INIT.D/MYSQLDCP support-files/my-default.cnf/etc/my.cnf #修改启动脚本vi/etc/init.d/mysqld # Modified: Basedir=/usr/local/mysql/datadir=/usr/local/mysql/data/mysql #启动服务service mysqld start #测试连接./mysql/bin/mysql- Uroot #加入环境变量, edit/etc/profile, so you can use MySQL command from anywhere export path= $PATH:/usr/local/mysql//bin<BR  >source/etc/profile  #启动mysqlservice mysqld start# close Mysqlservice mysqld stop# view run status service Mysqld Status

5. Error

5.1 SQLyog 1130 error when connecting, due to no user rights issue for remote connection

Resolution 1: Change the ' MySQL ' database ' user ' table ' host ' entry from ' localhost ' to '% '.

Resolution 2: Direct authorization

GRANT all privileges on * * to ' root ' @ '% ' identified by ' Youpassword ' with GRANT OPTION;

5.2 Some errors during installation

-bash:./scripts/mysql_install_db:/usr/bin/perl:bad Interpreter: No file or directory
FIX: yum-y Install Perl perl-devel

Installing MySQL system Tables..../bin/mysqld:error while loading shared libraries:libaio.so.1:cannot open shared objec T file:no such file or directory
Solution: Yum-y Install Libaio-devel

6. Other

6.1 Configuring Environment variables

VI +/etc/profile

Export Path=....:/usr/local/mysql/bin

MySQL installation under Linux

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.