1, download the compressed package: To download the free installation of MySQL compression package http://dev.mysql.com/downloads/mysql/According to the machine select 64 or 32 bit:2, unzip to the corresponding directory. I extracted it under
The Date_format () function is used to display date/time data in different formats.GrammarDate_format (Date,format) The date parameter is a valid day. format Specifies the date/time in which the output is formatted.The formats you can use are:
Common operations for MySQLCreate the database User: "Create user ' username ' @ ' localhost ' identified by ' PASSWORD ';Delete database User: Delete from user WHERE user= "username" and host= "localhost";Authorization to User: Grant all privileges
Experiment One:Server A and Server B is a master-slave relationship, the associated library has test1, Test2 Library, master and slave has been running normally, at this time due to business needs, need to increase the TEST3 library, and let it
In the SELECT * from table, when the garbled phenomenon is often shown, enter status, you will find: at this time as long as set NAMES UTF8 can solve the problem. At this point, enter status again: summary:SET NAMES UTF8EquivalentSet
Reference: http://yhqlzz.blog.51cto.com/2557314/1159084/MySQL official website: http://dev.mysql.com/doc/refman/5.1/en/replication-rules.htmlMaster-Slave synchronization experience: http://www.educity.cn/shujuku/1180182.html
There are several
purpose : Periodically dump the MySQL database, keeping only the last 5 days of backupOperation Steps :1. Create a new user test password dedicated to backup test123;>grant select,show view,trigger,alter On * * to [email protected] ' localhost '
MySQL each storage engine uses three types (levels) of locking mechanisms: row-level locking, page-level locking, and table-level lockingAvailabilityRow-level locking (Row-level)The most important feature of row-level locking is that the particle
Application optimization1. Using connection pooling2. Reduce access to MySQL1) Avoid repeating queries on the same data2) using query caching3) Add the cache layerSuch as:
Extract part of the data from the database and put it on the
1. Primary database operation(1) Configuring the my.cnf fileVi/etc/my.cnfin the [Mysqld] added in:server-id=1// database ID, main library default 1, other from the library increment, cannot repeat, otherwise synchronization error;Log-bin//binary
1. Install PHP 5We must pass PHP-FPM to get PHP5 to work properly, install the command:Apt-get Install PHP5-FPMPHP-FPM is a daemon process.2. Install MySQL 5 databaseTo install the MySQL Run command:Apt-get Install Mysql-server mysql-clientDuring
Install and use mysqlIn OJ, mysql is mainly used to store user information. It is easy to install and use. The following is a brief introduction. First, I will explain that my Linux branch environment is Ubuntu 12.04, and the general steps of other
Execution sequence of SQL statements with Left Join, joinsqlBasic SQL Execution Sequence
SQL statements are executed in a certain order. Understanding this sequence is of great help for SQL usage and learning.1. fromSelect a table or source to form
Mysql encounters an error similar to "Everyderivedtablemusthaveitsownalias"
Every derived table must have its own alias
This statement means that each derived table must have its own Alias.
This error occurs when multiple tables are queried.
The
MySQL (7)1. mathematical functions
(1) absolute value function (ABS (x) and return the circumference rate function PI
ABS (X) returns the absolute value of X
Select abs (2), abs (-3.3), abs (1-9 );
Select pi ();
(2) square root function SQRT (x) and
Create MySQL ODBC and MySQLODBC
1. Choose Control Panel> Administrative Tools> data source (ODBC );
2. Click Add. select MySQL ODBC 5.1 Driver as the data source Driver;
3. the MySQL Connecotor/ODBC dialog box is displayed. Enter the data
MySQL (Part 5)
1. bitwise operators
Bitwise operators are used to test, shift, or test bitwise in binary bytes. The bitwise operators provided in MySQL include: bitwise OR (|), bitwise AND (&), shift by bit or (^), shift by bit left (), and reverse
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