A power outage occurred during the creation of a table primay key this morning. When the computer started up again, it was found that the MySQL service could not be started. The net start error 1067 was prompted, after two hours, the problem could
Our requirement is to remove China from the address field and set the (province_id) field of the province with the data address field.
First, for string search, we can use the replace usage in MySQL. This blog also mentioned. See: http://www.jb51.
I don't know if anyone has encountered such a disgusting problem: two tables are connected to the query and limit. SQL is very efficient. However, after order by is added, the statement execution time has become very long, extremely low efficiency.
1. MySQL support
1.1 MySQL module support
By default, the MySQL module is not included.
The opensipsctlrc file contains the database configuration information. To enable opensips to support mysql databases
It is necessary to support the mysql module.
When migrating a database from MSSQL to MySQL, You need to insert 0 values in the auto-increment column of MySQL based on the requirements of business logic. In MSSQL, this is done as follows:
Copy codeThe Code is as follows: string SQL; SQL = "set
1. Install Nginx
One command:USE = fastcgi emerge nginx
Create a user and a group:Groupadd wwwUseradd www-g www
After Nginx is installed, the nginx group and nginx users are added by default. However, I still prefer to create a www group and www
1. view the current character set:
Copy codeThe Code is as follows: show character set;
2. Delete mysql related directories
Copy codeThe Code is as follows: rm-rf/usr/local/mysql/* installation directory
Rm-rf/var/lib/mysql database directory
3.
If you want to import Chinese data, the utf8 Character Set set in mysql will save the UTF-8 character set for the xxx.txt file you want to import. The command load data infile "d: /Websites/Sxxxx/test1.txt "ignore into table 'names' fields
This is a good mysql database optimization article I have seen on the Internet. The content is full!
1. Use indexes to traverse tables faster
The index created by default is a non-clustered index, but sometimes it is not optimal. In a
You can specify the SQL file initially executed after mysql is started in the configuration file. Its syntax is:In [mysqld] or [server], specify:Init-file = D: \ mysql-5.5.28-winx64 \ abc. SQL, followed by the specific SQL file valuePay attention to
Mysql database startup Error:
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
100224 12:24:20 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB:
They will discuss the statements that return data, such as INSERT and statements that do not return data, such as UPDATE and DELETE. Then they will write a simple program to retrieve data from the database.
Execute SQL statements
Now we have a
Although order by does not match the ORDER of the index, the index can still be used, as long as the unused index part and all the additional order by fields are included in the WHERE clause.
Use the index MySQL OrderThe following queries use
Log_slow_queries must be enabled for a slow query output. You can set it in the MySQL configuration file (my. ini/my. cnf) or through the MySQL client. The advantage of the second method is that the setting takes effect without restarting the MySQL
After logging on to mysql by default, you can view the system VARIABLES and their values using the show variables statement.
Mysql> show variables like '% character % ';
(The following is the settings under the CentOS-6.2 (different versions may
Version: 5.5.19-winx64
1. Change the my-small.ini TO my. ini (please change according to your machine configuration)
2. Enter the following in the command line:\ Bin \ mysqld -- console press enter and you will see the following:
Mysqld: ready
Copy codeThe Code is as follows: class mysql
{
Private $ db; // datebase connect
Private $ result; // mysql result
Static private $ mysql; // mysql object
Private function _ construct ()
{// The work before Create an object
$ This-> db =
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