CentOS 6.5 Environment Installation MySQL 5.1

Source: Internet
Author: User

"Introduction to the Environment"

Operating system: CentOS 6.5 i686 i386

MySQL version: Mysql-community-5.1.73-1.rhel5.i386.rpm-bundle.tar

"Installation Steps"

1. Create MySQL users and groups

-G MySQL MySQL

2. Unpack the installation package

#进入安装包目录 $ cd/software/mysql_install$Tar-XVF mysql-community-5.1. the-1. Rhel5.i386.rpm-bundle.Tar#解压后有很多包, Basic installation requires only server and client package $ls-L-rwxr--r--. 1 mysql mysql 7583249 Nov 9 mysql-client-community-5.1.73-1.rhel5.i386.rpm-rw-r--r--.1MySQL MySQL158781440May +  One: +mysql-community-5.1. the-1. Rhel5.i386.rpm-bundle.Tar-rwxr--r--.1MySQL MySQL65728353Nov9   -Mysql-community-debuginfo-5.1. the-1. rhel5.i386.rpm-rwxr--r--.1MySQL MySQL11305883Nov9   -mysql-devel-community-5.1. the-1. rhel5.i386.rpm-rwxr--r--.1MySQL MySQL32842715Nov9   -mysql-embedded-community-5.1. the-1. rhel5.i386.rpm-rwxr--r--. 1 mysql mysql 20810122 Nov 9 mysql-server-community-5.1.73-1.rhel5.i386.rpm-rwxr--r--.1MySQL MySQL1931288Nov9   -mysql-shared-community-5.1. the-1. rhel5.i386.rpm-rwxr--r--.1MySQL MySQL3260831Nov9   -mysql-shared-compat-5.1. the-1. rhel5.i386.rpm-rwxr--r--.1MySQL MySQL15310916Nov9   -mysql-test-community-5.1. the-1. rhel5.i386.rpm

3. Install Server, client package

# RPM-IVH mysql-server-community-5.1. 1-ivh mysql-client-community-5.1. 1. rhel5.i386.rpm

Here is the default installation, after the installation of the directory:

Database directory
/var/lib/mysql/(includes MySQL, test database)
Configuration file

/usr/share/mysql (mysql.server command and configuration file)
Related commands
/usr/bin (Mysqladmin mysqldump and other commands)
Startup scripts
/etc/rc.d/init.d/(startup script file for MySQL directory)

4. Use the Mysqladmin tool to see if the installation was successful

# mysqladmin--versionmysqladmin  8.425.1.   Pc-linux-gnu on i686

5. Modify the root user password for MySQL

" New_password "

6. Stop the MySQL service

# service MySQL Stop
Or
#/etc/init.d/mysql Stop
Or
$ mysqladmin-u root-p shutdown

7. Start the MySQL service

# service MySQL Start
Or
#/etc/init.d/mysql Start

8. Restart MySQL Service

# service MySQL Restart
Or
#/etc/init.d/mysql Restart

9. Connect MySQL Database

$ mysql-u Root-p

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.