Mysql Quick Start
1. Download and decompress
$ Wget http://cdn.mysql.com/Downloads/MySQL-5.5/MySQL-5.5.42-1.el6.x86_64.rpm-bundle.tar
Extract the following files:
$ Tar-xvf MySQL-5.5.42-1.el6.x86_64.rpm-bundle.tar
MySQL-shared-5.5.42-1.el6.x86_64.rpm
MySQL-shared-compat-5.5.42-1.el6.x86_64.rpm
MySQL-server-5.5.42-1.el6.x86_64.rpm
MySQL-devel-5.5.42-1.el6.x86_64.rpm
MySQL-test-5.5.42-1.el6.x86_64.rpm
MySQL-client-5.5.42-1.el6.x86_64.rpm
MySQL-embedded-5.5.42-1.el6.x86_64.rpm
Ii. Installation
1. Install server
# Rpm-ivh MySQL-server-5.5.42-1.el6.x86_64.rpm
(2) If a conflict error occurs, it is because linux may have a mysql library that needs to be deleted first.
# Rpm-e mysql-libs.x86_64 -- nodeps
2. Install the client
# Rpm-ivh MySQL-client-5.5.42-1.el6.x86_64.rpm
Iii. configuration files
# ls *.cnfmy-huge.cnf my-innodb-heavy-4G.cnf my-large.cnf my-medium.cnf my-small.cnf# pwd/usr/share/mysql
When rpm is used for installation, the configuration file is stored in/usr/share/mysql and can be stored elsewhere as needed.
4. Start and close
1. Method 1: Command Line
# mysqld_safe &# mysqladmin -uroot shutdown
2. Method 2: Service Mode
# service mysql start# service mysql stop# service mysql restart
3. Connect to the database.
# mysql -u root -pEnter password:Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 1Server version: 5.5.42 MySQL Community Server (GPL)Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>