Linux installation MySQL

Source: Internet
Author: User
Tags mysql client install perl

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. Unzip

#解压

tar -zxvf mysql-5.6.33-linux-glibc2.5-x86_64. tar .gz #复制解压后的mysql目录 cp -r mysql-5.6.33-linux-glibc2.5-x86_64  /usr/local/mysql

3. Adding user groups and users

#添加用户组

groupadd mysql #添加用户mysql 到用户组mysql useradd -g mysql mysql4, install MySQL

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

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,

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

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

Put the MySQL client on the default path:

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

Errors encountered during the 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

Yum-y Install Numactl

Authorization to the user

2. Authorization law.

For example, if you want to myuser use MyPassword to connect to a MySQL server from any host.

Mysql> Grant all privileges on * * to ' myuser ' @ '% ' identified by ' MyPassword ' with GRANT OPTION;

FLUSH privileges;

Linux installation MySQL

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.