Sometimes, you want to drop some records or change their contents. The DELETE and UPDATE statements enable us to do this.
Modify records with update
UPDATE Tbl_name Set the column to change
The record WHERE you want to update
The WHERE clause
Convert () provides a way to convert data between different character sets. The syntax is:
CONVERT(expr USING transcoding_name)
In MySQL, the conversion code name is the same as the corresponding character set name.
Example:
SELECT
0, download and extract the zip version of MySQL
1, add environment variable path D:\mysql-5.7\bin;
2, add the Data folder in the D:\mysql-5.7\
3, modify the My-default.ini configuration file
Basedir = D:\mysql-5.7
DataDir = D:\mysql-5.7\data
MySQL Database Usage Summary
This article mainly records some MySQL daily use of the commands for future inquiries.
1. Change root password
Mysqladmin-uroot password ' yourpassword '
2. Remote login MySQL Server
Mysql-uroot-p-hip-p3306
3.
First, the installation of the required procedures
1, the prior installation of the development environment and MySQL database;
First, configure the Yum Server.repo file
[Root@localhost yum.repos.d]# cd
[root@localhost ~]#
Problem Scenario: Sometimes the binary files on the disk are deleted because of disk corruption or human error, causing the show binary logs record in MySQL to not match the binaries in the actual physical disk
#binlogdiff. SH #!/bin/sh #ocpyang
There are nearly 300 tables in the test library, and the Fid,uid fields of 278 tables need to be modified.
The workaround is to automatically generate an SQL statement that modifies the properties of the field.
statement used to generate SQL:
Environment
MySQL 5.1 + command line tools
Problem
MySQL Paging
Solve
--Creates a test table CREATE TABLE test (ID int (one) primary key auto_increment, name varchar () not NULL);
--Insert data mysql> INSERT INTO test (name) VALUES (' test1 '
This article discusses the types of indexes that MySQL supports and their pros and cons. Note that in MySQL, indexes are implemented at the storage engine level rather than the server layer, so the indexes of the different storage engines work
Mysqlbinlog
The tool that reads statements from the binary log. Logs of executed statements contained in a binary log file can be used to help recover from a crash.
MySQL database log, there are the following kinds of logs:
1. Error
In MySQL, because the use of limit this syntax, for paging query is very convenient, but also brought in the ranking of performance bottlenecks, reasonable use of the index, can greatly improve the running speed of MySQL.
Indexes are generally
We all know that Apache as a good Web server occupies a great part of the market, his status is currently no one can replace, but in addition to Apache, in the ranks of Web server software, Nginx with its stable performance, rich function, simple
1: Disk seek ability to high speed hard drive (7200 rpm), theoretically seek 7,200 times per second. There is no way to change, the optimization method is to----with multiple hard drives, or to spread data storage. 2: Read and write speed of hard
1, establish a class, including a format to convert Chinese to iso8859-1 encoding method:
publicclass Format2Chinese { public Format2Chinese() { } public String format2IS08859(String str) { try { if (str == null str.trim().equals("")) str = "";
Hardware: Intel (R) Xeon (r) CPU 5130 @ 2.00GHz * 2, 4G RAM, 564G SAS
Software: Red Hat Enterprise Linux as Release 4 (Nahant Update 4) 2.6.9 42.ELSMP (32-bit), MySQL 5.0.27-standard-log
Total records: 1016126, average size of 46822 per line
1.
The security of the database system includes many aspects. Because in many cases, the database server allows clients to connect from the network, the security of client connections has a significant impact on MySQL database security.
Do not provide
MySQL database encapsulation and paging query, mysql database Paging
// My database name is house
Class DBDA
{Public $ host = "localhost ";Public $ uid = "root ";Public $ pwd = "root ";Public $ dbname = "house ";
Public function Query ($ 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.