CopyCodeThe Code is as follows: repair table 'table _ name' to repair the table
Optimize table 'table _ name' optimize table
Repair table is used to repair damaged tables.Optimize table is used to recycle idle database space. When the data rows in
If you have never set a root user password for MySQL, the server does not need a password for connection as the root user. However, we recommend that you set a password for each account.
If you have previously set the root user password but forgot
6.8 synchronization startup options You must set the server-ID Option for both master and slave to ensure that each of them has a unique synchronization ID. You must select a positive integer between 1 and 2 ^ 32-1. For example, server-id = 3.
MySQL Error
Code List:
1005: An error occurred while creating the table.
1006: database creation failed
1007: the database already exists. An error occurred while creating the database.
1008: the database does not exist. An error occurred
Usage of MySQL time Conversion Function
Dayofweek (date)Returns the index of the week of the date (1 = Sunday, 2 = Monday ,...... 7 = Saturday ). These index values correspond to the ODBC standard.Mysql> select dayofweek (2007-10-31 );-> 4
From http://www.devshed.com/c/a/MySQL/Error-Handling-Examples/
Error handler examples
Here are some examples of handler declarations:
If any error condition arises (other than a not found), continue execution after setting l_error = 1:
Declare
Install Apache 2.2.4
1. Open my computer, go to drive D, create a folder P8-Server under it, and then create a local folder under it.2. Go to its official site to download and execute the apache_2.2.4-win32-x86-no_ssl.msi.3. Press the next button
G, the solution is as follows:
In the/var/lib/MySQL directory, delete ibdata1, ib_logfile1, and ib_logfile0, and restart MySQL to recreate the above files:
Mysqladmin-uroot-P Shutdown
Sudo mysqld_safe &
Done!
Below are otherArticle. For more
1. Overview of Replication
1.1 problems solved by ReplicationData replication technology has the following features:(1) Data Distribution(2) load balancing)(3) backup(4) high availability and fault tolerance
1.2 How replication worksFrom a
1. To optimize the query, try to avoid full table scanning. First, consider creating an index on the columns involved in where and order.
2. Try to avoid using it in the where clause! = Or <> operator. Otherwise, the engine will discard the index
Next, we will take a simple chat room design as an example to introduce the application of PHP + MySQL in Web development.
1. Overall Design1.1 conception and planning:The basic principle of a chat room is to store the speech data transmitted by
Comparison of not in, JOIN, is null, not exists Efficiency
Statement 1: select count (*) from A where A. a not in (select a from B)
Statement 2: select count (*) from A left join B on A. a = B. a where B. a is null
Statement 3: select count (*)
What is a MySql database?
Generally, a database is a collection of data. Specifically, a database on a computer can be a collection of files in the memory or a collection of memory data.MySql Databases and SQL server databases are actually database
I. Preface:
After the database server is set up, the first thing we need to do is not to consider which MySQL-initiated programs should be run on the server that supports the database, but when the database is damaged, how to safely restore to the
MyISAM tables emphasize performance, and the execution speed is faster than that of InnoDB, but transactions are not supported. InnoDB provides advanced database functions such as external keys for transactions.MyIASM is a new version of the IASM
We often use the MySQL replace function. The following describes the usage of the MySQL replace function in detail, hoping to enlighten you in learning the MySQL replace function.I recently studied CMS and used mysql replace function during data
That is to sayMysql opens a connection process at each link, and mysqli runs mysqli multiple times to use the same connection process, thus reducing the server overhead.When programming, some friends always use new mysqli ('localhost', usenamer ',
Author/Translator: ye Jinrong (Email:); Source: http://imysql.cn/. the interpreter can be used for commercial purposes.
Date: 2006/10/01
This article discusses the MySQL backup and recovery mechanisms and how to maintain data tables, including the
The solution is as follows:1. Delete the mysql service first. Control Panel-> Administrative Tools-> services, stop the mysql service firstStart-> Run-> Enter cmd-> SC delete mysqlDelete Service2. modify my. iniIf it is not created (refer to the
They all wanted to use PHP to implement random queries, but retrieving multiple entries seemed to require more than two queries.After reading the manual, find the following statement to complete the task.SELECT * FROM table_name order by rand ()
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