First, MySQL IntroductionMySQL is an open source small relational database management system, developer for Sweden MySQL AB, after the acquisition of the MySQL Ab,orance Company acquired Sum, so the current MySQL project by Orance Company is
today started to install MySQL, originally to the official website to download the installation package to install, but after installation but can not use, is expected to configure it, search the Internet very much information, the result or failure.
Linux operating systems: CentOS 6.31: Download: current MySQL version to 5.6.10: Http://dev.mysql.com/downloads/mysql/5.6.html#downloadsSelect "Source Code"It is best to register an Oracle account before this2: Necessary PackagesYum-y install gcc
1. Select Max (ID) from TableName2.SELECT last_insert_id () functionLAST_INSERT_ID is not related to table, last_insert_id will change if data is inserted into table A, and then the data is injected into form B.Max (ID) is obviously not available in
As a DBA, when learning any database, in addition to mastering how this database works, the most basic is the data type that he defines:Oracle's data type, if I'm unfamiliar, I'll check the official documentation against the version, then mail tells
1. Create userFormat: Grant permissions on database. * To User name @ login host identified by "password"Mysql>grant all on * * to [e-mail protected] "%" identified by "123456";Mysql>flush privileges;2. Change the passwordMysql>update Mysql.user Set
1. Create a stored procedure in the database firstDROP PROCEDURE IF EXISTS sqloperation;create PROCEDURE sqloperation () BEGIN insert into UserInfo (Userid,username,userpas Sword) VALUES (' 6 ', ' cyt ', ' cyt123 '); Update userinfo set
Key_buffer_sizeTo minimize the disk I/O, the MyISAM Storage engine table uses the key cache to cache the index, and the size of the key cache is set by the Key-buffer-size parameter. If the table used in the application is dominated by the MyISAM
MySQL GROUP by day (grouped by date) Select Day (Date field), SUM (field for totals) from table group by dateI. Annual ENQUIRYQuerying data for the yearSELECT *From Blog_articleWHERE year (From_unixtime (blogcreatetime)) = year (Curdate ()) Second,
Mysql>ExplainSelectActor.first_name,actor.last_name,Count(*) fromSakila.film_actorInner JoinSakila.actor using (actor_id)Group byfilm_actor.actor_id\g*************************** 1. Row***************************ID:1Select_type:simpleTable: Actor
1. Stop the MySQL service;2. Modify/ETC/MYSQL/MY.CNFDataDir modified to a new directory;3. Cp-r-p/var/lib/mysql to the new directory (copy with-p, keep the file attributes unchanged);4. Change the owner of the new data file to MySQLChown-r
Install mysql and centosmysql on servers in Centos
First, the path and statements here are modified after reading many errors on the Internet and I hope they will be useful to you.
Here, we need to follow this order during installation; otherwise,
Mysql performance optimization tips
For Mysql performance optimization, refer to [1], [2], and [3]. Some of the articles that have been used and have relatively good results are as follows:1. Practical optimization
(1) Disable autocommit to prevent
Mysql High Performance Memcached (1)This article describes how to install and use Memcached.What is Memcached?Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up
Comparison of differential functions between MySQL and Oracle
No.
Category
ORACLE
MYSQL
Note
1
Numeric Functions
Round (1.23456, 4)
Round (1.23456, 4)
Same:ORACLE: select round (1.23456, 4) value from
Use the Apache DBCP connection pool to reconstruct DBUtility to make database connection more effective and secure. dbcpdbutility
Avoid the following risks when you directly access the database using JDBC:
1. For each data operation request, you
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