This article describes the MySQL query time period method. Share to everyone for your reference. The specific methods are as follows:
MySQL query time period of the method is not everyone will, the following for you to introduce two MySQL query
Status = Show status like '% percent ' [example: Show status like ' Com_select ']variables = Show variables like '% percent ' [Example: show variables like ' query_cache_size ']
1, MySQL query times (status)Com_select; Com_update; Com_insert;
Creating a Database
The simplest way:
Copy Code code as follows:
CREATE DATABASE my_db;
Or is:
Copy Code code as follows:
CREATE DATABASE IF not EXISTS my_db;
To create a UTF8-encoded database:
This article mainly introduces the main usage of the show command in MySQL database
A. Show tables or show tables from database_name; --Displays the names of all tables in the current database.
B. show databases; --Displays the names of all
#!/bin/sh
#code by Scpman
#功能: Check and repair the MySQL database table
#将此脚本加到定时中, when the script executes, wait to read the library, list all the tables to be repaired, and then time to start the repair
# The damaged table is recorded in the
You must set the field to primary key (PRIMARY key or UNIQUE constraint (unique) by using the following two methods.1: Use Replace into (this method is to take advantage of the substitution method, a bit like a class in the first delete and then
This article describes the MySQL to get group by total record row number of methods, share for everyone for reference. The specific methods are analyzed as follows:
In general, MySQL gets the total number of records grouped by the group by
In actual demand, the contents of a certain table must be replaced in bulk, the ordinary thinking process is as follows:Select outStr_replace replacementUpdate WriteActually this is extremely wasteful of resources and consumes resources, MySQL built-
In a Debian environment, completely solve the problem that MySQL cannot insert and display Chinese
Linux under MySQL insert Chinese display garbled solution
Mysql-uroot-p return Enter password
Enter the MySQL view status as follows:
The
#Path to installation directory. All paths are usually resolved relative to this.Basedir= "D:\MySQL Server 5.1/"#Path to the database rootDatadir= "D:\MySQL Server 5.1/data/"
However, because it is not installed, the service is not generated and
Because my MySQL did not know why suddenly can't open and reported a 10061 error, check the next reason is because the database is connected to conflict, the trouble died so reload, in the last step of the start service stopped, installation failed,
(1) The simplest method of modification is to modify the character set key values in the MySQL My.ini file ,such as Default-character-set = UTF8Character_set_server = UTF8
After the modification, restart the MySQL services, service MySQL restartUse
This article describes the MySQL set trigger permissions method, the situation is very useful for permissions errors. The specific analysis is as follows:
The MySQL import data hint does not have the Super Privilege permission processing, as
Add a table field
ALTER TABLE table1 add transactor varchar (a) not Null;
ALTER TABLE table1 add ID int unsigned not Null auto_increment primary key
Modify the field type of a table and specify null or Non-empty
ALTER TABLE name change field
First, limit the concurrent processing of innodb. If innodb_thread_concurrency = 0 can be changed first to 16 or 64 to see machine pressure, ifVery large, first changed to 16 to let the machine pressure down, and then gradually increase to adapt to
MySQL root password is correct, but how can not log in MySQL from the local, prompted
Copy Code code as follows:
ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:yes)
Here, after a high
In the MySQL data type, the range of tinyint is: The signed range is 128 to 127. The unsigned range is 0 to 255 (see official "MySQL 5.1 reference Manual" http://dev.mysql.com/doc/refman/5.1/zh/column-types.html).
The tinyint occupies 1 bytes of
MySQL Basics first phase, how to remotely access the MySQL database Set permissions method summary, discuss access to a single database, all databases, specify user access, set access password, specify access to the host.
1, set access to
Environment:
Os:windows 2003
db:mysql5.5
1. Normal installation of the first MySQL (Installation steps omitted)
2. Stop the first MySQL service in the control Panel
3. Copy all directories and files under the C:\Program files\mysql directory to
Use the load command in MySQL to load the contents of the TXT file into a database table, for example, to create a table, the name is User, a field username; there is currently a db.txt file with a space-separated username, for example: Xiaowang
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