"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