Install and configure MySQL.
MySQL CRUD (add, delete, modify, and query)
List all databases
show databases;
Create a database
-- Create database mydb1 using MySQL Default Configuration; -- create database mydb2
Take notes for MySQL
Chapter 01
SQL (pronounced S-Q-L or sequel) is short for structured query language.SQL is a language specifically used to communicate with databases.
Chapter 02Mysql-u user-P [Password] [-H host-P port]
Chapter 03Show
To operate a table, you must first select a database because the table exists in the database. Select Database
MySQL> UseSchool;DatabaseChanged
After selecting the database, we can create tables in this database. Create a table
MySQL> Create
Put it here for future reference.
1. Database, database server, and database languageA database is a collection of persistent data that is used by enterprise application systems and managed by a database management system;
Database servers, also
Summary:
The first point: the six are all dried into utf8.
Mysql> show variables like "% char % ";
+ -------------------------- + --------------- +| Variable_name | value |+ -------------------------- + --------------- +| Character_set_client | utf8
MySQL encoding format. mysql modifies the encoding format.
I. Problem Introduction
When mysql is installed, the encoding format is configured as UTF-8. Therefore, mysql character_set_client, character_set_connection, character_set_database,
Ssh remote connection to the MySQL database character set in linux and prevent garbled characters, sshmysqlLab environment:
Local windows 8.1
Remote Connection Tool SecureCRT 7.3
CentOS 6.7 x86_64-bit Linux, kernel version 2.6.32-573
Mysql version
Show tables or show tables from database_name;Explanation: displays the names of all tables in the current database.
Show databases;Explanation: displays the names of all databases in mysql.
Show processlist;Explanation: displays all processes
Mysql usage summary, mysql SummaryDatabase Management System (DBMS)
DBMS, Database Management System Database Management, Simply put: is to manage a dataLarge software. DBMS manages and maintains data, or processes data security and
Mysql 5.6.17 Green Edition (Installation-free) installation and configuration tutorial, 5.6.17 installation and configuration tutorial
I recently used the MySql database for project development. After reading some articles about MySql, I quickly
Solve the Problem of MySQL Chinese garbled characters in Ubuntu, using tumysql
Problems Found
Recently I learned about Django and encountered the following problems when I inserted data in conjunction with MySQL
Use MySQL Character Set
For non-English websites, when they use non-English languages to write or read data from the database, it is often necessary to solve the character set problem. Character Set guides which character encoding scheme of the
Modifies the default encoding.
This code really messed up.
When the database server was installed, no database encoding was selected. Querying database encoding
PHP Code
Show create database guest;
All of them are latin1. Search
1. The role of the database: storing data.The database stores data differently from other means of storage:1. Can store large amounts of data2. Data is not lost3. Security4. Sharing5. Easy to find data2. History of database development:1. File
1, first recall the coding format of their own projects, that is, the encoding format used in the local encoding. UTF-82. Detection of Tomcat setup issues, settings in Web. XML and server:In Server.xml:"8080" protocol="HTTP/1.1" connectionTimeout="20
Integrity constraints for tablesthe complete syntax for creating a table#Syntax:CREATE table library name. Table name (field name 1 type [(width) constraint], field name 2 Type [(width) constraint], field name 3 Type [(width) constraint]);
Ysql two ways to view user permission commands:
A. Use MySQL grants
How to use:
The code is as follows
Copy Code
Mysql> show grants for Username@localhost; instance:Mysql> show grants for root@localhost;+----------------
The reason is that many times, in order to secure, do not allow MySQL management tools to connect the formal environment on the line, in this case, you can not rely on the MySQL management tools to transform the code to solve the problem of Chinese
Int
Integer data (all numbers) from -2^31 (-2,147,483,648) to 2^31–1 (2,147,483,647). The storage size is 4 bytes. The SQL-92 synonym for int is integer
varchar
Length is 0-255 characters OH
What is the meaning of the numbers following the int
Show tables or show tables from database_name; Displays the names of all tables in the current database
show databases; Displays the names of all databases in MySQL
Show columns from table_name to database_name; or show columns from
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.