The profiling of MySQL optimization toolAfter using the slow query log to parse out the slow query statement, analyze the performance of the statement with profiling after optimization.View slow query settingsMysql> Show variables like "%slow%";+----
String TypeChar and varchar When you define char and varchar , you need to set the length. Grammar:char (M); Maximum length is 255varchar (M); Maximum length is 65532 Different encoding lengths GBK The maximum is: 32767UTF8 max:21845M for length!
Calculated fields
If you want to display both the company's name and the company's address in a field, these two messages are typically included in different table columns
City, state, and zip codes are stored in different columns, but
Error code at startup:Starting MySQL[FAIL.] The server quit without updating PID file (/var/run/mysqld/mysqld.pid). ... failed!Lnmp the author of the Army elder brother gives the answer is:There is no error message in this, press [FAIL.] The server
In the MySQL database, both the read-only state and the Master-slave settings and relationships are involved in data migration and read-only state settings from the library. after practical testing, for MySQL single-instance database and master
information_schema Database Table Description:schemata: Provides information for all databases in the current MySQL instance. This table is the result of show databases.TABLES: Provides information about the tables in the database, including views.
If you use Mysql.server to start, you need to pay attention to the point, to modify the contents of the inside, modify the following: about 218 rows or soView copy print?
Then
print_ Defaults=
else
# Try to find Basedir
Recently used the MySQL UDF, checked the relevant literature, the user user to implement function and aggregate function method to do a description.
Quickly write a MySQL UDFTo be able to quickly understand what the UDF (user-defined function) is,
See: http://blog.yemou.net/article/query/info/tytfjhfascvhzxcyt343When people talk about the index, if there is no particular type, it is mostly the B-tree index, which uses the B-tree data structure to store it. This index is supported by most
LampLayering mechanism:User--[HTTPD Protocol]--apache--[fastcgi Protocol]--php--[mysql Protocol]--mysqlTiered Benefits:Apache PHP and MySQL are CPU-intensive services that can be layered to relieve CPU pressureThe same layer can also do load
Absrtact: We often need to make a bulk insert of SQL, which requires that the record does not exist and is inserted, and the presence is not inserted. What if an INSERT statement is used?Normal Insert into
1. Download MySQL, probably because the server operating system version is low (CentOS4.3), the installation of 5.7 prompts for Lib, just I do not need to install a new version, so downloaded 5.1 linux-generic (glibc 2.5) (x86, 64-bit), Compressed
Set the character encoding used by the SQL statement: set names UTF8;Determines whether the specified database exists: DROP db if EXISTS library;Start using the specified database: use library;Create database for creating databases;Create data table
The first method: The hard disk may be full, clean up the junk file.The second type:View the database running status/etc/init.d/mysql statusTipserror! MySQL is running but PID file could not being foundPrint the MySQL process firstPS aux | grep
If you need to reprint, please agree with me.I once wrote a script that uses select ... into outfile principle to export data, but the script value is suitable for local quick export and does not support remote service, so the following script is
These days to pay the time, and the use of things, in order to facilitate their own later to view, today idle nothing on the previous things to tidy up. (Which references someone else's stuff, here thanks to the code they contributed!) )First,
Mysql datetime query exception troubleshooting, mysqldatetime Query
An error occurred while querying mysql datetime.
Exception: Value '2017-00-00 00:00:00 'can not be represented as java. SQL. Timestamp (0000 11:38:40)
Description: non-null
Some experiences on MySQL Stored Procedure Exception Handling, mysql Stored Procedure
Drop procedure if exists 'SP _ model ';
DELIMITER ;;Create procedure 'SP _ model' (IN V_TYPE INT)BEGIN/********** Stored procedure template, combined with the
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