Installation and service start-up:
sudo apt-get update [remember update source every time]
sudo apt-get install mysql-server [command line installed, middle to enter root account password]
After the installation is successful, MySQL is
1. Download the appropriate MySQL installation source packageAddress: http://dev.mysql.com/downloads/mysql/5.1.html2. Uninstall unused old installed MySQL if previously installedSince many Linux distributions are preloaded with MySQL, they are
Create a databasecreat table Test (#整数通常使用inttest_id int,#小数通常使用decimalTest_price Decimal,#普通文本通常使用, and use default to specify defaultsTest_name varchar (255) Default "Xxx",#大文本类型使用testTest_desc text,#图片使用blobTest_img Blob,#日期类型使用DateTimeTest_date
INSERT intoVideo_tag_all (tagname,ctime)SELECT 'Liverpool',1413954816 fromVideo_tag_allWHERE(SELECTLAST_INSERT_ID (ID) fromVideo_tag_allWHERETagName='Liverpool') is NULLLIMIT1;SELECTLAST_INSERT_ID ();Background: Using the Insert ignore or insert ..
During the week:SELECT * FROM Wap_content where week (created_at) = Week (now)Query Day:SELECT * FROM table where to_days (column_time) = To_days (now ()), select * FROM table where date (column_time) = Curdate ();Query 7 days:SELECT * FROM table
MySQL Database data correctionhttp://blog.itpub.net/22664653/viewspace-717175/The need for data revisions is often encountered during the course of work, and the operation itself is not difficult. Operation requires the ability to keep rolling back ~
MySQL partitioning technology separates data tables on physical storage, logically as a tableThere are 5 types of partitions in the mysql5.1 versionRANGE Partitioning : Assigns multiple rows to partitions based on column values that belong to a
#shell实现, export the stored procedure code in MySQL directly to the file dbcn= "mysql-h172.16.1.194-uroot-p123456";d b=bcreport_sync_executor;ii=0;ct= ' $DBCN -n-e "SELECT COUNT (1) from Mysql.proc as P where 1=1 and p.db= ' $db ' and p.type like '
Download can be downloaded to csdn.net.Other Environment Introduction:1, rhel6.3 x64, minimized installation2. mysql 5.5.40Installation steps:Tar xzvf tar-xzvf sysbench-0.4.12.tar.gzCD
1) about the configuration file pathSometimes I find that although I try to modify some variables of the configuration file, it does not take effect. It turned out that the modified file was not a configuration file read by the MySQL server.If you
Today in the process of learning MySQL database, mistakenly deleted the root user, has been "MySQL Error 1045 (28000): Access denied for user root" error, the online search for a half day to find a solution:1. Edit the MySQL profile my.ini(under
Unzip after download. Copy the My-default.ini into My.ini The contents of the amendment are as follows: # for advice on how to change settings please see# http:// dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html# *** do not edit
1. Initial installation Change root password' NewPassword ';2. New User// a user named: JEECN Password: JEECN was created . mysql> INSERT INTO Mysql.user (Host,user,password) VALUES (' localhost ','jeecn ', Password (' JEECN ') ));OrCreate user
MySQL version: mysql-5.5.19.tar.gz (placed under/root)CMake This edition: cmake-3.0.2.tar.gzMain Library 192.168.5.204 from library 192.168.5.203
Install MySQL on the primary server (install CMake first to compile MySQL)[Email protected] ~]# tar
MySQL multi-instance configuration (1)
For centralized O & M of MySQL databases, you can deploy multiple MySQL instances on one MySQL database server. This function is implemented through mysqld_multi. Mysqld_multi is used to manage multiple mysqld
Create a MySQL slave Database
We know that Oracle has DataGuard to back up data in real time, which can be used for master-slave switchover. MySQL also has its own backup database solution, which is called master-slave replication.
The MySQL slave
Mysql generates a complete Stored Procedure Definition Statement
Select concat ('pr _ ', p. db ,'. ', p. name) FileName, CONCAT ('delimi', 'TER $ USE '', p. db, ''$ drop procedure if exists'', p. name, ''$ create definer = ', ''', LEFT (DEFINER,-1 +
Mysql forgot password
Sometimes it is really uncomfortable to suddenly forget the MySQL password. Here is a method to reset the password when the MySQL password is forgotten, the operating system win8, MySql version: 5.6.10
1. Shut down 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