Summary of the methods for copying table structures in mysql using command lines:
1. only copy the table structure to the new table
Create table new table select * FROM old table where 1 = 2
Or
Create table new table like old TABLE
2. copy
NOTE _ 2 wildcards in MySQL: (trailing spaces may interfere with wildcard matching)
% Match any character _ match any single character
Regular expression: REGEXP
The usage is to replace the LIKE position, followed by a regular expression.
Case
SQLMode usage in Mysql
I. INTRODUCTION to Mysql SQL Mode
Generally, the MySQL server can work in different SQL modes and apply these modes to different clients in different ways. In this way, applications can customize server operations to meet
When initializing the mysql database, a character encoding error is Prompted. sometimes the following error occurs after the database is installed and initialized:
Root @ localhost mysql-5.5.19] # bash scripts/mysql_install_db -- user = mysql --
Install Jenkins in windows 1. run the "java-jar Jenkins. war" command when installing jenkins. the following problems occur:
It is only because port 8080 is occupied by a program and you need to modify the port number.
Solution:
Run the
The main differences between MyIsam and InnoDB are MyIsam and InnoDB. There are four major differences: cache mechanisms, transaction support, locking implementation, and physical data storage methods (including indexes and data ).
1. Cache
Mysql time type operation
SELECT year ('date2'), month ('date2'), day ('date2'), time ('date2') FROM 'studen' WHERE 1
Definition and usage
The DATE_ADD () function adds a specified interval to a date.
Syntax
DATE_ADD (date, INTERVAL expr
Install MySQLdb in Linux
One of the following access methods is to use the MySQLdb module. The following describes how to install MySQLdb in Linux.
(1) Download MySQLdb
Download the latest MySQLdb, http://sourceforge.net/projects/mysql-python/
Hibernate data type, the corresponding table between standard SQL data types Hibernate
Record the table corresponding to the hibernate mysql ing type:
1. conventional Hibernate ing
Ing type
JAVA type
Standard SQL type
Mysqldump
Mysql provides the msyqldump tool to export the database.
After searching for articles on the Internet, most of them are from one article, with a wide range of contents. Most of them are not used.
I sorted out some of the options I used
MySQL User management and permission management show grants for wzhao;
Grant ALL on *. * to 'wzhao' @ '% ';
----------------------------------------------------
GRANT
SELECT
,
INSERT
,
UPDATE
,
DELETE
,
CREATE
,
DROP
, RELOAD, SHUTDOWN,
How to set mysql tables is case-insensitive. by default, MySQL is a database table that is installed on Linux. The modification is simple. you only need to modify the mysql configuration file.
Mysql> show tables;+ -----------------------------------
Analysis on the principle and cache process of using Memcache to cache mysql databases
For large websites such as facebook and ebay, if Memcache is not used as the intermediate cache layer, data access cannot be avoided. for general websites, as
MySQL service is starting. MySQL service cannot be started. System error. System error 1067 occurs. The process stops unexpectedly. MySQL service is starting. MySQL service cannot be started. System error. System error 1067 occurs. The process stops
MySQL execute the Select statement to export the results to the file method if it is for MySQL the entire table data export, you can refer to the article: http://www.crazyant.net/1355.html
However, you also need to execute an SQL statement and
How to thoroughly uninstall mysql (xp) mysql
The complete method to uninstall MySQL 5.x is as follows:
1. add and delete programs in the control panel.
2. delete the MySQL installation folder C:/Program Files/MySQL. if you have backed up, you can
Install and verify the Sqoop installation and verification environment:
System
Redhatlinux 6.4
HadoopVersion
1.2.1
SqoopVersion
1.4.4
MysqlDatabase version
5.6.15
Implement data
MySQL Query optimization or indexes are not used when or is used
mysql> explain SELECT * FROM aladdin_resource WHEREstate = 1 OR state = 2;+----+-------------+------------------+------+---------------+------+---------+------+-------+-------------+|
[MySQL case] HA: GTID_MODE configuration inconsistent 1.1.1. HA: GTID_MODE configuration inconsistent
[Environment description]
Msyql5.6.14
[Error message]
In the initial state, both the Master and Slave enforce-gtid-consistency and gtid-mode
Mysql garbled solution: display the character set and change the corresponding character set to utf8
Show variables like "% char % ";+ -------------------------- + --------------- +
| Variable_name | Value |
+ -------------------------- + ----------
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