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
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;
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
Grant WGDP user Query permission: Grants select on wg_dp.* to ' WGDP ' @ '% ' identified by ' weigou123 ';Grant all privileges on * * to' Yangchao ' @ '% 'identified by ' weigou123 'Query MySQL Other user rights: show grants for WGDP; cancel WGDP
MySQL wildcard charactersThe pattern match for SQL agrees that you use "_" to match any single character, while "%" matches the random number of characters (containing 0 characters). In MySQL, the default mode of SQL is to ignore uppercase and
1. may be/usr/local/mysql/data/rekfan.pid file does not have permission to writeWorkaround: Give permission, execute "chown-r mysql:mysql/var/data" "Chmod-r 755/usr/local/mysql/data" and restart mysqld!2. The MySQL process may already exist in the
The code that follows the tutorial (2)The first step is to create a new database in the local MySQL database ZhyoulunStep two, create a new table in the database and insert several dataCREATE TABLE ' country ' ( ' Code ' char (2) NOT null PRIMARY
There is no detailed description of key_length in the MySQL manual, and the calculation method of Key_length is verified by experiments.
When the index field is a fixed-length data type, such as Char,int,datetime, if there is a null tag, this
Storage and use of IP addresses
IP addresses are stored in int type and converted using INET_NTOA () and INET_ATON ().
mysql> select inet_ntoa('2130706433'),inet_aton('127.0.0.1'); +-------------------------+------------------------+ | inet_ntoa('213
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
Familiar with MySQL stored proceduresStored Procedure is a set of SQL statements for specific functions. It is compiled and Stored in the database, you can call and execute a stored procedure by specifying its name and giving a parameter (if the
Configuration steps for mysql dual-machine hot standby
Set dual-machine Hot Standby:
First, you must create a synchronization user on the two machines:
Grant replication slave on *. * to 'repdcs '@ '192. 168.21.39' identified by '123 ';Grant all
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] the Mysql database processes Chinese characters transmitted in Servlet.
The default encoding of many Mysql instances is latin1. If Mysql does not change the encoding during installation, it cannot be entered into Chinese directly and
Mysql master-slave configuration parameters and stepsMaster-slave configuration steps:Create the database to be synchronized in the master database, create the account of the master database, and modify the configuration of the master and slave
Differentiation between after and before for MySQL triggerAfter: add, delete, modify, and then trigger the data. The triggered statement is later than the added, deleted, and modified statement, which cannot affect the previous add, delete, modify,
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/
Use the GROUP_CONCAT function of MySQL to implement aggregate multiplication.The MySQL aggregate function provides addition, average, minimum, and maximum, but not multiplication. Here we use the existing MYSQL GROUP_CONCAT function to implement
Shell to export each mysql stored procedure as a single file
# Shell implementation: export the Stored Procedure Code in mysql as the file dbcn = "mysql-h172.16.1.194-uroot-p123456"; db = BCReport_Sync_Executor; ii = 0; ct = '$ dbcn-N-e "select
Basic mysql knowledge ReviewCreate a databaseCreat table test (# An integer usually uses an int.Test_id int,# Decimal is usually used for decimals.Test_price decimal,# Common text is usually used and Default is used to specify the Default
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