When MySQL is installed, there are warning:
[Root@localhost mysql]# scripts/mysql_install_db--user=mysql installing MySQL system tables ... 2015-08-13 14:20:09 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated.
Please
In the last article we mentioned hot standby, which is backup when MySQL or other database services are running. This article shares another method of backup, which is hot copy. Hot copies are similar to hot spares, except that they use the
In the local installation of MySQL server, open cmd,cd to the MySQL installation directory in the bin directory, the bin directory can see multiple executables, where mysqladmin can be used to remotely shut down the MySQL service.
The mysqladmin
The syntax for creating stored procedures in MySQL is hard to remember, unless you often deal with the storage process for the simple reason that grammar is not a trivial joke. If you control MySQL through the command line, you need to remember the
Sometimes a table or result set contains duplicate records. Sometimes it is allowed, but sometimes it needs to stop repeating records. Sometimes it needs to recognize that duplicate records are removed from the table. This chapter describes how to
The use of PHP code to implement database backup can make the site management becomes very convenient, we can directly into the background operation can complete the database backup.
Key technologies:
1. First you have to get the tables in the
Continue to do the following preparatory work:
Create a new test database testdb;
Create DATABASE TestDB;
Create test tables table1 and table2;
CREATE TABLE table1
(
customer_id VARCHAR) not null, City
Use a
Copy Code code as follows:
SELECT ' Keyword_rank '. * from ' Keyword_rank ' WHERE (advertiserid= ' a ') LIMIT 2 OFFSET 1;
For example, the SQL, followed by the limit is 2 data, offset is from the 1th read from the
First, clear the MySQL table data
Delete from table name;TRUNCATE TABLE name;Delete statements without a where parameter can delete all content in the MySQL table, and you can also empty the MySQL table with TRUNCATE table.Efficiency truncate
After the MySQL installation is successful, there are several default configuration templates, which are listed below:MY-HUGE.CNF: for high-end products server, including 1 to 2GB RAM, mainly running MySQLMy-innodb-heavy-4g.ini: for installation
In MySQL, there are two field types that are confusing, that is, text and blobs, especially bloggers who write their own blog do not know to change to their own blog positive text segment select text or blob type.
Here are a few differences:
I.
When you insert data into a table, you often encounter situations like this:
1, first judge whether the data exists;2, if it does not exist, then insert;3, if present, then update.You can write this in SQL Server:
Copy Code code as follows:
The implementation method of creating user and authorization in MySQL.
Operating Environment: Widnows XP Professional + MySQL5.0
First, create a user
Command: CREATE USER ' username ' @ ' host ' identified by ' password ';
Description:
MYSQL get current date and date formatGet system Date: Now ()Format Date: date_format (date, format)Note: Date: Time fieldFormat: Date formats
Back to system date, output 2009-12-25 14:38:59Select Now ();Output 09-12-25Select Date_format (now (), '%
In the case of MySQL InnoDB, the preset tansaction isolation level is repeatable read, and there are two main ways to read locks in a select:SELECT ... LOCK in SHARE MODE SELECT ... For UPDATEBoth of these methods must wait for the other transaction
Operating Environment: There are table Game_list, fields: uid,score1,score2,seat_id,last_update; The incoming parameter is I_player_detail, the passed-in value is the ID of multiple users, the previous score, after the score, Seat numbers, each
MySQL is a powerful open source database. With more and more database-driven applications, people have been pushing MySQL to its limits. Here are 101 tips for adjusting and optimizing MySQL installation. Some of the tricks are specific to the
First, create pinyin comparison table
Copy Code code as follows:
--Create a Chinese phonetic control temporary table
CREATE TABLE IF not EXISTS ' T_base_pinyin ' (
' Pin_yin_ ' varchar (255) CHARACTER SET GBK not NULL,
' Code_
Let's say how to migrate from SQLite to MySQL.
Get ready
First, you have to install the MySQL database. If you are using an Ubuntu system, please refer to this article. Other systems please refer to their respective documentation.
Export Current
Referring to some of the methods provided on the Internet, it is very complicated to find that. Here's a quick and easy way to share.
First, the information about the MySQL user is stored in the user table of the MySQL database, and the password
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