Used to like the source of the installation of MySQL, always feel that the source code is tall on the matter, but the source code also need time, especially when make, if the disk and the CPU is poor, the time is very long, in the virtual machine
Scripts can be executed on any machine (need to install MySQL, at least MySQL client, MySQL only version 5.6 and above), first enter the source IP, detect the source IP on the normal operation of MySQL, and then in the local dump MySQL database, It
Logical architectureMySQL's logical architecture is divided into 3 layers,
Connection thread processing.
The core functionality of the server, query parsing, parsing, optimization, caching, and all of the inside to functions.
Open & Edit/etc/my.cnf
Add skip-grant-tables under[mysqld]
Restart Mysql
You should is able to login to MySQL now using the below commandmysql -u root -p
Runmysql> flush privileges;
Set New Password byALTER USER ‘root‘@‘localhost‘
Slow queries need to be optimized for normal workYou have to use Percona-tookit's pt-query-digest to analyze slow logs.Percona-tookit:Https://www.percona.com/doc/percona-toolkit/3.0/index.htmlHow to use:#pt-query-digest Slow log filesThe summary of
Tagged with: logs error PNG cannot find solution reason for MySQL lineOne, the cause of the problem personal speculation may be due to the installation of the green version of MySQL, and then in the system variable path to learn the path after the
I. Installation APACHE21. Enter the sudo apt-get install apache2 to download the installation apache22. Enter Y to confirm3. Successful InstallationAfter the Apache installation is complete, the default Web site root is "/var/www/html", enter
MySQL Engine overview
Data in MySQL is stored in files (or memory) in a variety of different technologies. Each of these technologies uses different storage mechanisms, indexing techniques, locking levels, and ultimately offers a wide range
stitching field-concat () function The values are concatenated together to form a single value. Note: Most DBMS use + or | | To implement stitching, MySQL uses the concat () function to implement.go to space function-trim function Trim Remove the
MySQL gets the current time as now (), unlike SQL Server GETDATE ().SQL Server to MySQL error after change to limit 1 in top 1:Select 1 from where visitor_ip="andDateDiff(mi,visitor_time,getdate()) - 1[ERR] 1582-incorrect parameter count in the
NULL and NOT NULLmysql> CREATE TABLE tb2(-Usename VARCHAR (a) not NULL,-Age TINYINT UNSIGNED null (can be empty));Query OK, 0 rows affected (0.06 sec)Mysql> SHOW COLUMNS from TB2;+---------+---------------------+------+-----+---------+-------+|
1. Select the most applicable field propertiesMySQL is good at supporting large data volumes, but in general, the smaller the tables in the database, the faster queries are executed on it. Therefore, in order to achieve better performance when
MySQL enforces indexes and disables an index1, MySQL mandatory use index: Force index (index name or primary key PRI)For example:SELECT * FROM Table Force index (PRI) limit 2; (use primary key)SELECT * FROM Table Force index (ZIDUAN1_INDEX) limit 2;
Mysql database enables slow query logs and mysql database logs
Modify configuration file
Add the following two sentences to the configuration file my. ini:
1 log-slow-queries = C: \ xampp \ mysql_slow_query.log2 long_query_time = 3
The first
Mysql 5.7.17 winx64.zipan Assembly placement tutorial, 5.7.17winx64.zip
I had to reload win10 and sort out the files. However, it was not worthwhile to install MySQL for one afternoon. So I wrote this article to help you.
Reference link: graphic
Fuzzy query and SQL fuzzy query
Public function Index () {// fuzzy query by account, real name, and mobile phone number $ user = M ('cuser'); $ where = "(IFNULL (projectno ,'". session ("user") ['projectno']. "') = '". session ("user") ['projectno'].
Implementation of regular Mysql database table backup
Implementation of regular Mysql database table backup
0. Background
In the actual development environment, the front-end program needs to update/insert data to the database table specified by
In MySQL, replaceregexp is used for regular expression replacement.
This article describes how to replace regular expressions with replace and regexp in MySQL. We will share this with you for your reference. The details are as follows:
Today, a
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