MySQL several points of knowledge

Common commandsPrinciple: Use the tool as much as possible with the visualizer, and the command line is limited to troubleshooting.mysql -u ACCOUNT -pPWD -h IP -P port [-D database] //连接数据库show databases; //显示数据库列表use db_name; //使用数据库show tables;

MySQL (ii)

Table operation of the data 1. Create a tableSyntax: CREATE TABLE table_name (column_name column_type);CREATE TABLE student, ID int not NULL auto_increment, name CHAR (+) NOT NULL,--age INT not NU LL, register_data DATE, PRIMARY KEY

MySQL SQL optimization '% '

The main purpose of the design index is to help us get the results of the query quickly, whereas a like query starting with% cannot use the B-tree index.Considering that the InnoDB tables are clustered tables (similar to the Index organization table

After the MySQL database InnoDB table and the MyISAM table are mixed, the transaction rolls back the test.

Test environment centos7.3+mysql5.7A table using the InnoDB engine, the table name Innodb_testThe other table uses the MyISAM engine, and the table name Innodb_testIn the event of a transactional operation, see what happens.Table structure same as

MySQL uses the database

Haha can only blame oneself too food haIt's not long since I contacted this MySQL.Mysql-u root-p when landing MySQL with a terminal todayAnd then you want to see your own database.I use the MySQL client is navicat for MySQL I look at the client

Centos7 Source Installation MySQL

1) Download the required#cd/data/soft# wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.21.tar.gz# TAR-XFZF Mysql-5.7.21.tar.gzversion 5.7 needs to download a boost C + + 1.59.0, (slow download)# wget

Windows install MySQL

Download the Unzip installation package1. Initialize the database and execute the command in the bin directory of the MySQL installation directory: Execute command mysqld--initialize--consoleA temporary password was generated:

Haproxy+mysql implementing proxy MySQL

we typically run into a business scenario like this:b host and C database in the same intranet, a host cannot directly access the C database, we can build the agent on the B host let a access C database, we use Haproxy to do this thingCENTOS7

JDBC Connection MySQL Data

First, start with a new Java project:Then create a package in SRC and set up a test class for testing:Then import MySQL:Once the import is successful, it will appear in the project list:Then start writing code in test:Package com.nf;Import

Delete duplicate data in MySQL keep only one bar

With SQL statements, delete duplicates only keep oneIn thousands of records, there are some same records, how can you use SQL statements, delete duplicates1, look for redundant records in the table, duplicate records are based on a single field

MySQL Modify table field order

Modify field arrangement position ALTER table name MODIFY field name 1 data type first| After field name 2 Parameter Description First, optional parameters Change Field 1 to the first field in the table. After field name 2 Insert Field 1 to the back

MySQL Multi-table query

Multi-table query, SQL JOINS1. INNER JOIN inside joinsSelect S.name as student_name,t.name as Teacher_name from students as s inner joins teachers as T on S.teacherid=t.tid; /*2 table take intersection, inner connection */2. Cross-ConnectSELECT *

Mysql Storage Engine

InnoDBInnoDB is the default transactional storage engine for MySQL, and only consider using other storage engines if you need to InnoDB unsupported features.The MVCC is used to support high concurrency, and 4 standard isolation mechanisms are

MySQL 1130-host 127.0.0.1 isn't allowed to connect to this MySQL server

In the development in order to make development more convenient, in the local configuration environment, you want to have direct access to the MySQL database on the server, more convenient management database,You need to remotely connect to the

JMeter connecting MySQL

The first step is to download the JDBC driver jarThe second step is to add the jar path in the test plan (if the drive jar is placed in the path. \apache-jmeter\lib directory, you can eliminate the step of adding a path)Step three, add the JDBC

MySQL Storage engine

MyISAM Storage EngineAdvantages: Supports up to 256TB of storage space Read data faster and consume less resources MyISAM Engine Storage File: TBL_NAME.FRM: Table-style definition Tbl_name. MYD: Data files Tbl_name.

Add an index to a field in MySQL

1 General IndexALTER TABLE ADD INDEX index_name ('column')2 PRIMARY Key indexALTER TABLE ADD PRIMARY KEY ('column3 Unique IndexesALTER TABLE ADD UNIQUE ('columnA unique index here guarantees uniqueness of the data record, and in many cases, creating

MySQL Query--go to heavy

INSERT into ' material ' (' id ', ' file_url ')SELECT id,ekm. ' File_url 'From ' extmaterial ' as EKMLeft JOIN (SELECT ' file_url ' from ' material ' WHERE ' id ' = ID) as PM on PM. ' File_url ' = EKM. ' File_url 'WHERE EKM. ' ext_id ' = Extid and

CentOS7 Installing the LUA environment (I'm in MySQL for read and write separation)

: http://www.lua.org/download.htmlInstallation method:Execute the following command in turn:Curl-r-O Http://www.lua.org/ftp/lua-5.3.1.tar. gz tar zxf lua-5.3.1.tar. GZ CD lua-5.3.1 make linux test Problems that may

MySQL Open remote connection

When MySQL is installed, it is only locally connected by default.Mysql-u Root-p MySQL>Use mysql; MySQL>Select 'Host'From user where user='Root'; MySQL>update User Set host ='%'where user ='Root'; MySQL>flush privileges; MySQL>Select 'Host'From user

Total Pages: 3233 1 .... 2548 2549 2550 2551 2552 .... 3233 Go to: GO

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.