MySQL Note 20151021

Source: Internet
Author: User
Tags dba mysql client

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.