//manipulating records in a data tableCreate TableUser2 (IDsmallintUnsignedPrimary Keyauto_increment, usernamevarchar( -) not NULL, Passwordvarchar( -) not NULL, Agetinyint not NULL default Ten, sex Boolean)--insert--InsertUser2Values(NULL,'Sun Chu'
1. Number of system mysql processesPs-ef | grep "MySQL" | Grep-v "grep" | Wc–l2.slave_runningMySQL > Show status like ' slave_running ';If the system has a slave replication server, this value indicates the health of the server from
In the project, to determine a certain number of fields in the table, if a value is replaced, using a few typical string operations, the record Note implementation scheme is as follows:Note: If the substitution string is unique, you can use replace,
Mysql_stmt_prepare failed! Error (1461) Can ' t create more than Max_prepared_stmt_count statements (current value:16382)。The replies given are as follows:The Max_prepared_stmt_count parameter limits the upper bound of the prepared statement in all
First upload the cmake-2.8.8.tar.gz, mysql-5.5.32.tar.gz source package to the server.
Unzip and install the CMake
[Email protected] ~]# TAR-ZXVF cmake-2.8.8.tar.gz [[email protected] ~]# CD Cmake-2.8.8[[email protected] cmake-2.8.8]#
As a Java developer, a database backup estimate is a must-learn.Unfortunately, I have been doing business logic processing of front and back, database operation is not how to contact.Today saw a bat file, is a DOS file copy and MySQL data backup
There are many ways to install the CentOS installation in this article and we introduce a very easy installation method, provided the network connection is normal.Step one: Enter the command wget http://dev.mysql.com/get/mysql-community-release-el7-5
Several concepts related to the transaction isolation level:Dirty read: Read data that has not yet been committed by another transactionNon-repeatable READ: Read the data submitted by other things, the focus of non-repeatable reading is to modify
Format: mysql-h host address-u user name-P user Password1. Connect to MySQL on this machine. First open the DOS window, then enter the directory Mysql\bin, and then type the command Mysql-u root-p, enter after the prompt you to lose the password.
"Backed-up Commands"1) backing Up the databaseMysqldump-uroot-pwsyht-b Library name >/opt/test.sql #加-B for information on adding use DB and CREATE database db2) View the databaseEgrep-v "#|\*|--|^$"/opt/test.sql #查看test. SQL Library Contents3)
First, the log introduction MySQL logs are mainly divided into four categories, using these log files, you can see what happened inside MySQL. These four types of logs are:
Error log
Logs a problem that occurs when the MySQL service
1. Download the packageSee how many bits of Linux areUname-ix86_64 64-bit or i386 32-bitNot installed wget using Yum installationYum Install Wget-ySwitch to the specified directory, and the package is downloaded to the directorycd/usr/local/src/64
Today found the company monitoring system problems, check found that the original Bin-log log too large to cause the disk full, resulting in the inability to insert data. Then find a solution on the Internet.1. Stop the library and delete the
MySQL has the following types of logs:Error log: Log-errQuery log: LogSlow query log: log-slow-queriesUpdate log: Log-updateBinary log: Log-binTo generate the log in the/var/log directory (where the system log is stored, only the root account has
MySQL > Show processlist;Out of several screens, no 1000 also have hundreds of, query statements to lock the table, hurriedly find the first locked thread_id, in the shell of MySQL execution.MySQL > Kill thread_id;The process of killing the
1, configuration onLinux:Added in MySQL config file my.cnfLog-slow-queries=/var/lib/mysql/slowquery.log (Specify the log file location, can be empty, the system will give a default file Host_name-slow.log)long_query_time=2 (record over time, default
We know the difference between char (m) and varchar (m) is that VARCHAR (m) is a variable-length string, and char (M) is a fixed-length string. For the time being, let's take a look at What is meant by M in CHAR (m) and VARCHAR (m), without regard
Mysql DATE_FORMAT usage, mysqldate_format
DATE_FORMAT(date,format)
DateThe parameter is a valid date.FormatSpecifies the output format of the date/time.
Mysql DATE_FORMAT usage
%
Abbreviated name of a week
% B
Check the status of the mysql Master/slave configuration and fix the problem that slave does not start. mysqlslave
1. view the master StatusMysql> show master status; // Position should not be 0Mysql> show processlist;// The state should be Has sent
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