easy installation of MySQLusually we can download the binary distribution version of MySQL from the MySQL official online, directly based on a platform, such as Linux x86_64, and the extract can be used in green. http://www.mysql.com/downloads/
How to install MySQL database, do not say here, just say its master-slave copy, the steps are as follows:1, the master-slave server for the following actions:1.1. Consistent version1.2. Initialize the table and start MySQL in the background1.3,
1, reduce the number of queries, how to reduce? 2, table structure optimization, how to optimize? 3, column selection principle? 4, the index principle?5, MySQL statement optimization? 6. Increase MySQL processing performance?Pass these points, and
Primary server:10.236.51.151From server:10.236.51.152Install MySQLYum-y Install Mysql-devel Mysql-serverRun the Security Settings WizardMysql_secure_installationPrimary serverCP/USR/SHARE/MYSQL/MY-LARGE.CNF/ETC/MY.CNF (My-large is a file that notes
Environment Preparation:Match fixed IP address capable of normal communication service iptables stopsetenforce 0service Mysql start the initial data from the database server must be consistent with the values on the primary database server
StatementThe Stars last nightBlog:http://yestreenstars.blog.51cto.com/This article by oneself creation, if need reprint, please indicate source, thank cooperation!ErrorERROR 1418 (HY000) at line 1693:this function have none of deterministic, NO SQL,
1. View MySQL Database sizeSELECT sum (data_length) +sum (index_length)From INFORMATION_SCHEMA. TABLES where table_schema= ' database name ';The resulting result is in bytes, except 1024 for K, except 1048576 (=1024*1024) for M.2. View the last
Before installing, you should check whether the system is comfortable with MySQL software package Rpm-qa|grep-i MySQL #如果有的话需要先删除 rpm-e software name--nodeps #To See all files in an RPM package (for example, a mysql-server rpm), run a command like
Describe the situation, there is a database Xiyouzyadlog with sync authorization  , and the result I authorize the time authorized to xiyoumaintxzyandroid all rights, cause sync User login can see all the database, So delete sync user results
Creating a new JSP page with Eclipse Tomcat (i) describes how to create a Web program and the first JSP page, as well as some of the necessary configuration required by eclipse. Today, we focus on how to query data from a database and display it on
Definition and usageThe Date_sub () function subtracts the specified time interval from the date.GrammarDate_sub (Date,interval expr type) The date parameter is a valid day expression. The expr parameter is the time interval that you want to add.The
Definition and usageThe Curdate () function returns the current date.GrammarCurdate ()Example 1Here is the SELECT statement:SELECT now (), Curdate (), Curtime ()The results are similar:
Now
()
curdate ()
curtime ()
How does mysql count the number of entries in a table?
The following is a common SQL statement used to count the entries in a table:
Select count (*) from tableName; # orselect count (1) From tableName; # or counts a column, such as IDselect count
Mysql exports the queried data as excel
Now you need to export some data from the mysql database to excel and print it. In fact, it is very easy to implement the above requirements, as long as you write the SQL statement, and then export it as
Enable remote services in mysql
Enter mysqlserver
As follows:
Enter password :******Welcome to the MySQL monitor. Commands end with; or \ g.Your MySQL connection id is 810Server version: 5.6.10 MySQL Community Server (GPL)Copyright (c) 2000,201 3,
MySql database connection pool
1. Traditional links (as shown below)
Note:
(1). the traditional method of finding DriverManager to connect is limited.
(2). the traditional method of close () does not reuse the Connection, but only cut off the
MySQL grouping and sorting takes the first N records and generates an automatic number sequence -- limit and rownumber after groupby
My colleague asked me to group by column and then extract the first few items from each group.
Table
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