Configure MySQL installation-Free Edition in Linux

Source: Internet
Author: User

I. Preparations

Note: because it is installed on a server that already exists and has been used by multiple parties, you must first confirm whether Mysql has been installed on this Linux server.

1. When groupadd mysql, the system prompts that mysql already exists and useradd-g mysql also prompts that mysql already exists. Basically, you can confirm that mysql has been installed;

Switch to mysql to view the mysql process. If no result is displayed, the current mysql is not started;

When mysql start is input, an ERROR occurs: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql. sock '(2). Do not study this error first. Prepare to reinstall mysql.

Enter rpm-qa | grep mysql. No information is displayed. If this method is not used, you do not need to uninstall it and directly install it.

2. Confirm the system environment:

Enter the command: uname-a to obtain the following information: Linux localhost. localdomain 2.6.9-55. ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux, www.bkjia.com indicates that the system is 32 bits;

3. Download the MySQL installation package:

Download the corresponding installation package from the official website (My mysql-5.1.51-linux-i686-glibc23.tar.gz );

Ii. Installation

1. Create a mysql group and user (created, skipped );

2. Use the root user to authorize the mysql installation path and execute the following commands in sequence:

MYSQL_BASE =/opt/mysql
Mkdir-p $ MYSQL_BASE/product/5.1
Mkdir-p $ MYSQL_BASE/mysqldata/mysqllog
Mkdir-p/var/run/mysqld/
Mkdir-p/etc/mysql
Chmod-R 777 $ MYSQL_BASE
Chown-R mysql: mysql $ MYSQL_BASE
Chown-R mysql: mysql/etc/mysql
Chown-R mysql: mysql/var/run/mysqld/

Note: The above path is the path for mysql installation. Some paths are related to the actual environment.

  • 1
  • 2
  • 3
  • 4
  • Next Page

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.