First Kind : Check Slow Query of the SQL Grammar : long_query_time = 2 ( more than Span style= "font-family: ' Times New Roman '" >2 seconds sql syntax recorded It is also a way to set a short point to record the error. ) The
MySQL Character set settings view
1. List all the character sets supported by MySQL:
SHOW CHARACTER SET;
2. Current MySQL server character set settings
SHOW VARIABLES like ' character_set_% ';
3. Current MySQL server
Mysql Master-slave synchronous setupMySQL master-slave synchronization uses the SQL statements recorded in the binlog log to achieve data synchronization, which enables automatic data backup. building mysql master-Slave synchronization requires a
When you install MySQL using Apt-get, Ubuntu automatically generates a username and password. So on the first landing, the following error will be reportedERROR 1045 (28000): Access denied for user ' db ' @ ' localhost ' (using Password:no)and the
1: Download 64-bit MySQL compression pack: http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.17-winx64.zip2: Decompression, the path of self-determined, mine is in the S:\program\mysql-5.7.4-m14-winx64.3: New My.ini, content as follows, I copy
@ pour a table from the old database into a SQL file $mysql-uroot-p my_db > My_db.sql (enter password)@ Import $sudo apt-get install mysql-server-y (the password to initialize the root user) in the new environment $mysql-uroot-p
Reprint http://bzyyc.happy.blog.163.com/blog/static/6143064720115102551554/KeyThe index that is actually used. If NULL, the index is not used. In rare cases, MySQL chooses an index that is poorly optimized. In this case, use Index (indexname) can be
* GRANT REPLICATION SLAVE, REPLICATION CLIENT on *. * to [email protected] ' 192.168.0.% ' identified by ' P4ssword '; (a permission to replication the master/slave server to copy code) 3: Modify the configuration file of the primary database
Operating system Centos 6.4 x86_64Software version MySQL 5.5.37One master-from replication (asynchronous)When the master-slave server has just completed MySQL installation, no dataPrimary server 192.168.200.127From server 192.168.200.1281 time
Try MySQL under Ubuntu, want to set the default character set again, the result finally MySQL broken, each execution: "Mysql-u root-p" time, will be error: "Error 2002 (HY000): Can ' t connect to Local MySQL server through socket
Demand:1: Install mysql 5.6 Database2 : Build studb Library, and build stuinfo student table, required to build field stu_id name age sex Class dizhi 3: Add a new field name ID in the table to the primary key index, and let the ID
One, view all databases in MySQLshow databases;Second, view the database that is currently in useSelect Database ();Third, view all tables in the current databaseShow tables;Iv. Viewing the table structureDescribe employees;Where employees is the
First, Download:http://dev.mysql.com/downloads/windows/installer/Second, after installation can use Workbench for graphical interface integration operation, you can also use command line operation, the following use command line operation.1,
1, transaction processing InnoDB supports transactional features, MyISAM not supported. Myisam executes faster and performs better. 2,select, UPDATE, INSERT, delete operation MyISAM:if executing a lot of select,myisam is a better choice
[Mysql] Common commands-forgot password
The previous article basically summarized how to create a user using commands in myql. For details, see [Mysql] Common commands-user operations (create, authorize, modify, and delete)
What should I do if I
Summary of slow mysql Server Query
Developers often find that they do not use indexed or limit n statements, which will have a great impact on the database, for example, a large table with tens of millions of records needs to be fully scanned, or
Install mysql on mac
Method 1: If you have installed homebrew, you can directly install it through homebrew. There are tutorials online.
Method 2:
Method 2: Download the mysql Installation File dmg on the official website and double-click it,
1
Mysql uses group_concat () to merge multiple rows of data into one row, and mysqlgroup_concat
Assume that two tables a, B, and B are associated with table a through the field id, and table a and table B are one-to-many relationships. Assume that
We often encounter fuzzy condition queries when using queries, and fuzzy queries involve string mode matching.
Here, we will mainly talk about two aspects: standard SQL pattern matching and extended regular expression pattern matching.
I. matching
MySQL is an open-source database, so it can be installed based on the source code. Source code-based installation provides more flexibility. That is to say, we can select a suitable compiler for our hardware platform to optimize the compiled binary
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