Usage:
INSTR (Ori_str, SUB_STR)
MySQL INSTR () finds the position of a string in another string, returning the index value of the first occurrence.
Example:1.
The code is as follows
Copy Code
Mysql> Select InStr ('
Grammar
INSERT into Db1_name (field1,field2) SELECT field1,field2 from Db2_name
Instance
You can run the Insert...select syntax to solve the problem:
Insert into Hotel_ktv (Title,price, number,date,area,content,num) Select
Recently encountered some egg pain, all the business processing to the MySQL function to deal with, resulting in the MySQL CPU usage is a tiger. SQL speech is also a language, including some processing functions for connection strings, such as
1. Brief description of the restoration principleBecause of the more detailed description in the document, here is a simple description. All INNODB data is organized in an indexed manner, and all data is stored in a 16KB block of data. The recovery
• View the size of each library
The code is as follows
Copy Code
SELECT SUM (data_length) +sum (index_length) from information_schema.tables WHERE table_schema= ' database_name ';
The result is in bytes, except
The functions are as follows:Left,right string InterceptFrom_unixtime Format Unix TimestampConcat string Join functionMax takes a column's maximum valueMin takes a column minimum valueSum calculates a column's sumCount Statistics BarMD5 returns a
---restore content starts---1. Purpose of the database: Write data and read data2. The life cycle of the query statement:(1) MySQL server listening 3306 port (2) Authenticated access User (3) Create MySQL thread(4) Check memory (Qcache)(5) Parse SQL
Article attribution: http://feiyan.info/16.html, I want to write to myself, but found this June summed up very detailed. Moved right over here.With regard to the benefits of MySQL indexing, if the correct design and use of the indexed MySQL is a
1.Ubuntu pip Install Mysql-pythonError Environmenterror:mysql_config not foundThe reason is that the mysqlclient package is missing and the sudo apt-get install Libmysqlclient-dev can be resolvedReference
CentOS 7 install MySQL first check if MySQL is installedYum List Installed | grep MySQLIf you have something, uninstall it all.Yum- y remove + database nameMySQL relies on Libaio, so install Libaio firstYum Search Libaio # retrieving relevant
Initialization is not a problem after executing mysqld--initialize--user=mysql
When performing Mysqld_safe--user=mysql & startup, the shell prompts the following650) this.width=650; "src="
Method Oneusing phpMyAdmin, this is the simplest, modify the MySQL library's user table,but don't forget to use the password function. Method Twousing Mysqladmin, this is a special case of the preceding declaration. mysqladmin-u root-p Password
Today again committed two, incredibly the copy of MySQL to forget, also drunk, summed up MySQL master and slave:The company's DB01-FK (172.33.4.155) machine is out of the question and needs to be replaced by a new machine. MySQL on this machine is
Problem: Use MySQL to implement the function of the generator, to ensure that the ID number is unique to each fetchImplementation: The following is a general idea, throw a brick, welcome replies.Depending on the size of the number segment, decide
Unified Character Set guaranteed not garbled: suggested Chinese and English environment Choice UTF81.Linux system language /etc/sysconfig/i18nLang= "Zh_cn.utf8"2.mysql client Temporary:Set names UTF8;Permanent:configuration file
Mysql InnoDB Line Lock Implementation method innodb row locks are implemented by locking the index entries on the index, which is different from Oracle, which is achieved by locking the corresponding data rows in the data block. InnoDB This type of
Mysql database performance optimization sub-query and mysql database performance optimization
I remember that when I was working on a project, I heard a sentence and tried not to use subqueries. So let's take a look at this article to see if this
Common mysql commands and basic mysql commands
Mysql database usage Summary
This article mainly records some mysql commands for future query.
1. Change the root password
Mysqladmin-uroot password 'yourpassword'
2. remotely log on to the mysql server
MySQL 5.7.9 service cannot start-"net helpmsg 3534" solution, 5.7.93534
For the installation process, refer to MySQL 5.6 for Windows decompression configuration and installation.
After successful installation, start MySQL and enter:
Net start
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