Float,double is prone to error, when precision requirements are higher, it is recommended to use decimal to save, decimal in the MySQL memory is stored as a string, used to define the currency requirements of high precision data.
Example
Creates a
After installing MySQL, unable to enter through the root, because the installation, and did not set the root password, there seems to be an initial random password, but do not remember, too troublesome, directly reset the root password. After
Today, the MySQL database copy to another computer, the result is not even, reported "Can" T connect to the MySQL server on ' localhost ' (10061) "error.
To search online, found an article is very good, both methods can solve this problem
There are two ways to solve this problem
1,where+group by (sort the group)2, the data returned from the form of the hands and feet (that is, subqueries)The solution by the Where+group byA function that sorts the groups in group by I only find Group_
TRUNCATE table deletes all rows in a table without recording a single row delete operation.
GrammarTRUNCATE TABLE name;ParametersName (the names of the tables you want to truncate or the names of the tables whose rows you want to delete)TRUNCATE
A Linux server scheduled backup
The first step is to create a new *.sh file.
New in Home directory
autobackupmysql.sh
#!/bin/sh# File:/home/mysql/backup.sh# Database InfoDb_name= "Test"Db_user= "Root"db_pass= "Root"# others VARsBin_dir=
The MySQL service failed to start on the local computer error 1067 process Unexpected termination this is typically My.ini file configuration error
First find this file: Default installation path
The code is as follows
Copy Code
Today I built a table with a column of timestamp type, and I meant that when the data was updated, the time of the field was automatically updated. Cruised is not very familiar with the value of this type, resulting in an error. Find that this field
Toss for a while, and finally the ASP and MySQL connection completed, feeling, close-up this article with everyone to share.
Check a lot of information, ASP and MySQL connection currently has two ways: one is the use of components, more famous is
Recently, the Internet has disclosed about the existence of a MySQL database Code execution Vulnerability (cnnvd-201609-183) situation. Because of a certain flaw in the MySQL database default configuration, an attacker could exploit the
MySQL Reference Manual for version 4.1.0-alpha.
--------------------------------------------------------------------------------
6.8 MySQL Full-Text Search
At 3.23.23, MySQL began to support Full-text indexing and searching. Full-text indexing
Share MySQL 5.7 docker master-slave replication Architecture Tutorial for your reference, the specific contents are as follows
Environment version:mysql:5.7.13docker:1.11.2centos:7.1
1. Install two MySQL on two physical machines first. Commands
In the article to tell you the MySQL database in the transformation of int varchar caused by the slow query, this article to introduce the MySQL database in the varchar type into the type of int, look at it!
MySQL provides us with two types of
The last week has 2 consecutive processing of slow queries due to the inability to use indexes for int to varchar conversions.
CREATE TABLE ' appstat_day_prototype_201305 ' (' day_key ' date not null DEFAULT ' 1900-01-01 ', ' appkey ' varchar
1, from MySQL official download mysql version of the source code "must be the source version"
2, the following code type Linux command line
Copy Code code as follows:
[note] Add MySQL group and user
#groupadd MySQL
#useradd-G MySQL
In a production environment, if an important service is shut down, it can produce unpredictable results, when we want to make a script, this script can monitor the service status, when the service shuts down, can automatically open the service, to
MySQL Union table update and deletion syntax introduction, mysql Union table syntax
Preface
I believe that when you use mysql in daily use, you may need to update two tables at the same time. I will use two SQL statements in the same transaction to
Mysql query result output to the file method, mysql Query Result
Export/output/Write mysql query results to a file
Method 1:
Run the following command:Mysql> select count (1) from table into outfile '/tmp/test.xls ';
Query OK, 31 rows affected (0
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