Why execute a MySQL statement, replace the character with the Replace function, but return a result of 0? This SQL statement is written like this:
The code is as follows
Copy Code
UPDATE V9_news_data Set Content=replace (
PHP's MySQL creation database and table
The database has one or more tables.Creating a DatabaseThe Create DB statement is used to build a database in MySQL.Grammar
CREATE DATABASE database_name
To learn more about SQL, please
The article examples of MySQL's 1067 errors in a variety of solutions, so that people encounter this error can quickly refer to the solution.
Content:
MySQL Error 1067: Process terminated unexpectedlyThis problem bothered me for a morning, very
1. To optimize the query, you should try to avoid full table scan, first consider the where and the order by the columns involved in the establishment of the index.
2. The null value of the field in the WHERE clause should be avoided as far as
1. Description of federated Storage EngineFederated storage Engine enables remote Access database without replication or cluster technologyWhen creating a table based on the Federated storage Engine, the server creates only one table definition file
MySQL can record all slow queries and record the SQL statements in the specified file, or you can add updates through the Mysqlbinlog record, or you can restore the database through Mysqlbinlog.
MySQL Slow query record
Edit My.cnf File
Linux is
1. New query statement file Query.sql, as follows:
The code is as follows
Copy Code
Use appdb;Set names UTF8;Select Feedid, city, message from Feed limit 1000;
The above set names UTF8 statement is the encoding
Executes a SQL, but the SQL statement is too large or contains a BLOB or LONGBLOB field in the statement. For example, the processing of image data. can easily cause MySQL server has gone away.
Today encountered a similar scenario, MySQL is just
Paris Country 10m-100m Unlimited flow free universal space
Site size: 10m-100m (gradually increase the space to 1G) support the external chain
Background operation: The simplest Control Panel
Support scripts: ASP PHP5 HTM HTML CGI
There is no
┝ user type: Free space┝ Space Capacity: 80M┝ provide domain name: http://free.fjmn.com/yourname┝ level Two domain name: x┝FTP Permissions: X┝asp Permission: √┝ Single File size: ≤4024 K
Home: http://www.fjmn.com
Application Address:
View MySQL Maximum connection data
The code is as follows
Copy Code
Show variables like '%max_connections% '
To modify the method:
Into the MySQL terminal,
The code is as follows
Copy Code
Before deleting a log, check the log files currently used by the master-slave server.
The code is as follows
Copy Code
First log on the MySQL terminal of the server to which you want to delete logs#mysql-U
The following is an example of the database "Ceshi"
1, connect the database
Mysql-u username-p Password
2. Create/Delete Database
Created: Create database Ceshi;
Delete: Drop database Ceshi;
3. Create/delete datasheet
Created: CREATE TABLE
There is a database on the line, and in slow log there are a number of records similar to the following:
The code is as follows
Copy Code
# time:130823 13:56:08# User@host:repl[repl] @ slave [10.x.x.x]# query_time:9.00083
Add the following content to the apache configuration file or the virtual host configuration file (that is, the configuration of LogFormat and CustomLog:LogFormat "insert into apachelog (ID, dateTime, IP, URL, code, referer, userAgent, size, request)
Using MYSQL for database backup is also a regular database backup method. It has the same concept as other database servers, but have you ever thought about it, mySQL will have a simpler backup method using the file directory, and it will be faster
Max queries per hour --- maximum number of QUERIES PER HOURMax updates per hour --- maximum number of UPDATES PER HOURMax connections per hour --- maximum number of CONNECTIONS PER HOURIn Win, you can modify my. ini:4.0 and later versions are
Import:Import data directly in Mysql:Mysql> use databaseName;Mysql> load data infile 'filepath' into table 'tablename'If you directly use an SQL script file, you can use source:Log on to the mysql database console, such as mysql-u root-p.Mysql> use
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,
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