For two nights, start with MySQL Basic installation and installation directory structure.
MySQL General 3 mode installs: RPM, binary, source
The simplest is the RPM installation mode, the default automatic configuration is OK. The simplest way to install is now.
Installation:
MySQL official various installation methods:http://dev.mysql.com/doc/refman/5.6/en/linux-installation.html
To see if MySQL is installed:
Rpm-qa|grep-i MySQL
To view the MySQL version provided by Yum:
Yum List | Grepmysql
Install MySQL by default (auto-download RPM package installation) using Yum:
Yum Install-ymysql-server MySQL Mysql-devel
view MySQL installed version:mysql–version (or enter mysql> select version ();)
View enable ports:NETSTAT-NTPL | grep 3306
stop MySQL services: service mysqld stop or/etc/init.d/mysqld stop
start MySQL services: service mysqld start or/etc/init.d/mysqld start
Go to MySQL (input MySQL, enter, first go in without a password):
[[email protected]] #mysql
Set root password (two ways):
Use MySQL;
Set password for [email protected]=password (' yourpassword ');
Update user set Password=password (' YourPassword ') where user= ' root ' and host= ' localhost ';
Flush privileges;
Installation is complete!
directory structure:
View Profile: VI/ETC/MY.CNF
Database Files directory: ll/var/lib/mysql/
Files for storing data and indexes in the IBDATA1:INNODB type
Mysql.sock: Socket file for client-to-server communication
Test: Database Test Directory
MySQL: Database MySQL directory
IB_LOGFILE0: Redo log file (transaction log)
Ib_logfile1: Redo log file (transaction log)
Storage files for tables in a database (3 files per table): Ll/var/lib/mysql/mysql
FRM: Data dictionary file
MYD: Data files
MYI: Index File
MySQL log file: Ll/var/log/mysqld.log
(e.g., initializing information at MySQL startup)
Run status process file:/var/run/mysqld/mysqld.pid
(The MySQL service does not appear until the file is started, and the shutdown disappears)
Descriptor and original configuration files, etc.:/usr/share/mysql (/ETC/MY.CNF can see the configuration file for this directory. cnf)
Help documentation Catalog:Ll/usr/share/doc | grep MySQL
Uninstall method:
Yum Remove mysql-server MySQL mysql-libscompat-mysql
Rm-rf/var/lib/mysql
Find/-name MySQL #查找mysql相关目录, continue to delete the following directory
MySQL installation (RPM installation mode) and directory structure