In this article I will introduce some examples of common SQL statement directories in everyday programming:
# 1. Establishment of the database
# # 2. Common queries
# 1. An example of a database is given in the form of an ER
17.1 MySQL Master-slave introduction
MySQL master-slave is also called replication, AB replication. Simply speaking is a and b two machines from the back, write the data on a, the other B will follow the writing data, the data in real-time
Enter MySQL locally via the command line:Mysql-u User name-p passwordMysql-u User name-p Enter passwordExit MySQL:\qExitForced exit, CTRL + ZTo create a user:CREATE user ' username ' @ ' domain name ' identified by ' password ';Domain name: Specify
Count the number of duplicate data occurrencesSELECT * FROM(SELECT * FROM(SELECT count (t1.compare_id) as c1,t1.*from T1Left JOIN T3 on t1.compare_id=t3.compare_idWHERE t1.compare_id=t3.compare_idGROUP by t1.compare_id) T) A1Left JOIN(SELECT *
Write in front:First, CentOS is integrated with MySQL itself. But the server I'm going to use is not being installed.Secondly, CentOS can be installed with Yum MySQL, I am happy and easy to use Yum to install MySQL. But it's frustrating when it's
CentOS self-test can be installed first mysql,elasticsearch do not understand, please refer to another articleInstalling LogstashOfficial: https://www.elastic.co/guide/en/logstash/current/installing-logstash.html1. Download the public keyRPM--import
Today, I want to use Navicat remote connection to the MySQL database in the virtual machine, has not been connected, searched the internet for a while, found that the reason is the MySQL remote user authorization issue. Here's a little bit about my
Not much to say, directly on the dry goods!C:\users\lenovo>pip Install mysql-connector-python-rf==2.1.3collecting MySQL-connector-python-rf==2.1.3downloading MySQL-connector-python-rf-2.1.3. tar.gz (271kB) -% |████████████████████████████████| 276kB
The Django framework is easy to use and is ideal for building personal blog sites. There are many tutorials online, mostly about command-line operation Django, here to share some of the latest tools for the Django development process, mainly pycharm
Installation environment, CentOS Linux version 3.10.0-514.el7.x86_641. Find the latest MySQL imageDocker search MySQL2, download the latest mysql-server imageDocker pull Mysql/mysql-server:latest 3, after the download is complete, you can view the
explain shows how MySQL uses indexes to process SELECT statements and join tables. Can help select better indexes and write more optimized query statements. Using the method, add explain to the SELECT statement, such as:EXPLAIN SELECT * from
This error occursFirst, see if the port of the virtual machine is openWhether the firewall is offBoth the account number and the password are correct.If it's right or not, it could be MySQL's permission problem.First, check the MySQL remote login
The character set of the MySQL client will typically follow the character set set by your system. For example, if your Linux system is set to a character set of GBK, the MySQL client's character set will also be GBK to view the client's character
SELECT * from (Select Case whenT.province=@prov Then @rownum:=@rownum+1 Else @rownum:=1 EndRowNum, Case whenT.province=@prov Then 0 Else @prov:=T.provinceEndProv, T.* from ( SELECT '110000'Province,1231 Money UNION All SELECT '11
After work in the morning, MySQL server encountered a small problem, during the troubleshooting process to view the MySQL error log process found that several InnoDB tables could not be opened, using DESC to view the table structure hints table on
You need to change the project to MySQL because you want to deploy the project to the cloud server and do not want to install SQL Server on the servers.Initialization of projects1, download the project compression package, the previous article has
Mysql Manual's bug in modifying column character encoding, mysqlbug
The project uses GBK encoding for historical reasons. garbled characters are not encoded in GBK format. This is a serious issue. We plan to modify the column's character encoding to
Mysql data import and export, data table optimization, mysql Import and Export
I. Data Import
Mysqlimport-uroot oa d:/aa.txt -- fields-terminated-by =, -- fields-optionally-enclosed-by = -- lines-terminated-by = \ r \ n
Or
Load data infile
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