MySQL Client tool
---------------------------------------------
MySQL Password-free login: Under/root vim. my.cnf
[Client]
user = ' root '
Password = ' 123456 '
host = ' localhost '
------------------------------------------
Mysql
Mysqldump
Mysqladmin
Mysqlcheck
Mysqlimport
MySQL Non-client tools
Myisamchk
Myisampack
MyISAM
No table three files:. FRM table structure
. myd table Data
. myi Table Index
InnoDB
All tables share a table space file:
Recommendation: No table A stand-alone tablespace file
That is: Show variables like '%innodb% ' view innodb_file_per_table = Off (recommended)
Vim/etv/my.conf
Add one line: innodb_file_per_table = 1
Service MySQL Restart
Mysql> mysqladmin Processlist
Mysqladmin Status--sleep Frequency
--count Times
Musqladmin Ping
Mysqladmin extended-status: Show state variables (status statistics)
Mysqladmin variables: Display server variables (work properties)
Mysqladmin Flush-privileges: Refresh Authorization
Flush-logs: Resetting most server state variables
Flush-status: binary and Trunk log scrolling
Refresh: Equivalent to simultaneous execution of flush-hosts and Flush-logs
Shutdown shutting down the MySQL server process
Version: Revision number, current status information
Start-slave: Initiating replication, starting a replication thread from the server
SQL thread
IQ thread
Stop-slave: Stop copying
------------------------------------------------------------
# mysql--help--verbose view MySQL available instructions
# Killall Mysqld
Datadir=/mydata/data
Hostname.err: Error Log
1. Previous service not closed
2. Data initialization failure
3, Data Directory location error
4, Data Directory permissions issues
-------------------------------------------------------------
DBA: Open DBA, database design, SQL statements, stored procedures, stored functions, triggers,
Manage DBA, installation, upgrade, backup recovery, user management, rights management, monitoring, performance analysis, benchmarking,
-------------------------------------------------------------
Data type:
numeric type int Decimal
Float Real
Character CHAR-varchar
Binary varbinary
DateTime Type: Date timestamp
-----------------------------------------------------------------
Enum (F, M)
Set any combination FM MF F M
-----------------------------------
MySQL Note 20151021