The SQL audit mainly accomplishes two purposes.
1, to avoid poor performance of SQL into the production system, resulting in lower overall performance
2, check the development of the design of the index is reasonable, whether you need to add an
To create a database of different character sets and delete a database under the command line:
[Root@lamp ~]#/usr/local/mysql/bin/mysql-uroot-p ' admin123 'Warning:using a password on the command line interface can is insecure.Welcome to the MySQL
IP planning:
MySQL Master: 192.168.0.100MySQL from: 192.168.0.200
MY.CNF Configuration
In the main MySQL [mysqld] Item, in addition to configuring the relevant parameters to configure the necessary three items, the simplest example is:
SQL statements with the most queries
Open General LogMysql> Show variables like '%general% ';+------------------+-------------------------------------+| variable_name | Value |+------------------+-------------------------------------+| General_log |
MySQL Group BY tutorial, is grouping Oh.
When you have mastered the basics of MySQL, it takes time to take the next step and take on the aggregate function. Before we talk about them, let's review the definition, overall, as it relates to
50MB Free php/cgi/jsp Space applicationThe free universal space size is: 50MB;
Monthly flow limit of: 3GB;
Supports PHP, CGI, Perl, Ruby, Python, SSI;
Provide 2 MySQL database (MySQL 4.1 or MySQL 5.0) free of charge;
Supported Java versions: 5.0
I. Data deletion
The code is as follows
Copy Code
Connecting to a database tutorial$link _id = mysql_connect ("localhost", "root", "") or Die ("Connection failed");if ($link _id){mysql_select_db ("My_test");if (!$_get[id]
1. Back up MySQL:
Export a library to a SQL file
The code is as follows
Copy Code
Mysqldump db_name >/home/hx/backup/name.sql-uroot-p
Back up multiple libraries (using the-b parameter)
The code is
First, the way to start
1, use service to start: Service mysqld start
2. Start with mysqld script:/etc/init.d/mysql start
3. Use Safe_mysqld to start:safe_mysqld&
Second, stop
1, use service to start: Service mysqld stop
2. Start with mysqld
Symptoms of damage
A typical symptom of a damaged table is as follows:1. When selecting data from a table, you get the following error: Incorrect key file for table: ' ... '. Try to repair it2. The query cannot find rows in the table or return
The error is as follows:discuz! Info:mysql Query Error
User: Love Me JingmenTime:2007-3-5 11:00amScript:/bbs/post.php
Sql:insert into Cd12sb_threads (FID, readperm, Price, iconID, typeID, author, Authorid, subject, Dateline, Lastpost, last Poster,
The My.ini in the MySQL directory, and then copies a my.ini on the colleague's machine to modify it and put it in a separate place as a backup. The contents are as follows:
The code is as follows
Copy Code
Nonsense not to say, although you can install MySQL directly through the Yum, but in order to be able to have a clearer understanding of the installation process, we still use the source code to compile the installation.
The code is as
1. Buy Aliyun host ... haha )2. Update the Yum source.The Aliyun yum source needs to be updated before it can be used properly. Specific method: http://help.aliyun.com/view/13438670.html3. Install Apahce, PHP, MySQL and PHP to connect MySQL library
1) Preparation before installation
① download MySQL, get the source package from the official website, Http://dev.mysql.com/downloads/mysql#wget http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.27.tar.gz#tar XVF mysql-5.6.27.tar.gz#cd mysql-5.6.27
For demonstration, we first create two tables with bad indexes and get some data.Mysql> show create table test1 \ G* *************************** 1. row ***************************Table: test1Create Table: create table 'test1 '('Id' int (11) not null,
Sometimes you run show processlist in mysql, and then you will find that there are many such processes in the database:There are three reasons for sleep:1. Before the client program exits, it does not call mysql_close (). [write program negligence,
I. mysql master/slave mode:Synchronization: The master server writes data, stores the data on the hard disk, and records a binary log. The binary log is completely sent to the slave server and recorded in the relay log. The slave server responds to
The master-slave configuration is relatively simple. Record it briefly.Set the ip addresses of the two servers to 192.168.16.211 and 212 respectively.For the convenience of the experiment, the root password of Mysql is empty.Add server load balancer
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