Mysql Quick Start, 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 *. cnf
My-huge.cnf my-innodb-heavy-4G.cnf my-large.cnf my-medium.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-p
Enter password:
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 1
Server version: 5.5.42 MySQL Community Server (GPL)
Copyright (c) 2000,201 5, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Owners.
Type 'help; 'or' \ H' for help. type' \ C' to clear the current input statement.
Mysql>