The SQL language is divided into three levels.1, the DDL statement, the data definition statement, defines the database, the table, the index and so on the object definition. Common statements include: Create, DROP, alter. 2, DML statements, data
MySQL sinkhole one: replication filters cause data clutter ()MySQL version 5.6.20-logreplicate_do_db: All SQL under this DB session will be executed from the libraryreplicate_ignore_db: All SQL below the DB session is ignored from the libraryThe
Ctrl+alt+delete Open Task ManagerLogin database: Enter the DOS window, enter Mysql-u root-p Enter, and then enter the password, you can.Configure the PATH environment: D:\MYSQL\BIN;%SYSTEMROOT%\SYSTEM32;%SYSTEMROOT%;%SYSTEMROOT%\SYSTEM32\WBEM;
MySQL creates a user hail, password hail, specifies a database haildb to hailmysql-u root-ppassworduse mysql;insert into user (hoMySQL creates a user hail, password hail, specifying a database haildb to hailMysql-u root-pPasswordUse MySQL;Insert
MySQL has 5 levels of permissions, namely:Clobal level,database level,table level,column level,routine level.1,clobal level: It is the global permission for the entire MySQL database server. Permissions to a database in MySQL, or to a table in a
What is a transactionA set of SQL statements Action Unit group all SQL complete a business if the entire group succeeds, meaning that all the SQL within the group succeeds if either one fails, meaning the entire operation failsThe data goes back to
Php+mysql+js Drag div Instance code has been changed, placed in the directory can be used directly. Suitable for beginners to learn!Effects such as, more suitable to do can move, drag the message board,Implementation ideas:The idea is also very
1, the Rationality of database table design1) Three paradigmsOne paradigm: atomicity, attribute is not divided;Two paradigms: no partial dependence,Example: (school number, course name) → (name, age, score, credit), the existence of part of the
There are two major strides in opening MySQL's remote login account: 1. Determine that the firewall on the server does not block port 3306. MySQL default port is 3306, need to determine the firewall does not block 3306 port, otherwise remote is
MySQL Delete alias problem-log of meteor flame-NetEase Blog http://wzl3585493.blog.163.com/blog/static/7615611020126188377970/Delete from student s where s.id in (All-in);(Execution failed)Select s.* from student s where s.id in ();( executed
host:10-4-13-72 user:password:select_priv:n INSERT_PR Iv:n update_priv:n delete_priv:n create_priv:n drop_priv:n Reload_priv : N Reload Permissions table shutdown_priv:n process_priv:n Server Management file_priv:n load the file on the server
Mysql error-Modify mysql. sock location
Sometimes Mysql. sock location errors may occur in mysql, resulting in the inability to connect to the database.
When an error is reported in mac:
First modify my. cnf
The location is under/etc/my. cnf. If not,
Mysql user permission assignment and master-slave synchronous ReplicationGrant wgdp user query permission: grant select on wg_dp. * to 'wgdp '@' % 'identified by 'weigou123'; grant all privileges on *. * to 'yangshao' @ '%' identified by 'weigou123'
Use SQL statements to operate MYSQL character encoding-- View All character codes
Show character set;
-- View the commands for creating a database and the encoding used by the databaseShow create database dbtest;
-- View the database encoding:
Show
Considerations for MySQLDROPTABLE and DROP large tables
Syntax:
Delete table
DROP TABLE SyntaxDROP [TEMPORARY] TABLE [IF EXISTS] tbl_name [, tbl_name] ... [RESTRICT | CASCADE]
You can delete one or more tables at a time. You must have the DROP
Mysql master-slave switchover steps
1> normal switchover
1) Check the output of the show processlist statement from the server until you see Has read all relaylogwaiting for the slave I/O thread to update it
2) Make sure that the slave server has
MySQL trigger foreachrowFor each, each row is affected and all triggers are executed, which is called a row-Level Trigger. In oracle triggers, row-level triggers and statement-level triggers can be executed only once regardless of the number of rows
Usage of input, out, And inout parameters in MySQL stored proceduresStored procedure parameters: You can declare parameters in the brackets of the stored procedure. Syntax: create procedure p ([in/out/inout] parameter name parameter type ..) in:
Back up the MySQL database in linux and delete the Backup Data seven days ago
#! /Bin/bash # backup database hz jshuabo sdhuaboname =$ (date + % Y % m % d) /alidata/server/mysql-5.1.73/bin/mysqldump-u root-p123456 hz>/root/sqlBackup/hz. $ name. SQL/
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