1. How to create an independent account and Set permissions
Here I use navicat as my database management tool to open navicat.
Select "user" -- "create user"
Enter the user name, host, and password. Note that the host name is not "localhost"
Note: My runtime environment is widnows xp professional + MySQL5.0
1. Create a user:
Command: create user 'username' @ 'host' identified by 'Password ';
Description: username-the username you will create, host-specifies the host on which the user
Event Type: Error
Event Source: Service Control Manager
Event Type:NoneEvent ID: 7034
Date: 2012-11-1
Event: 9:25:52User: N/
COMPUTER: SVCTAG-HZWGF3XDescription:The service MySQL stops unexpectedly. This occurs once.
For more information, see Help
In linux
Linux uses utf8 encoding by default, while windows uses gbk encoding, so the above garbled characters may occur.
Solve the Problem of garbled data during mysql Import and Export
The first thing to do is to determine the encoding format of
-- Group data by a certain field to get the data of the row with the maximum (small) Value
Copy codeThe Code is as follows :/*
The data is as follows:
Name val memo
A 2 a2 (the second value of)
A 1 a1 -- the first value of
A 3 a3: The third value of
I used to think that there are two bytes to record the length (a small length can also be recorded using one byte), so this problem was boring at the time.
However, some people in the group explained the problem and suddenly found that it was not
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
Create two test tables and create the unique constraint on the id column.
Mysql> create table test1 (id int, name varchar (5), type int, primary key (id ));
Query OK, 0 rows affected (0.01 sec)
Mysql> create table test2 (id int, name varchar (5),
From the official documentation, we know that the default mysql connections compiled and installed on linux are 100, which is far from enough for website requirements.
Mysql officially told us that we need to modify the value of max_connections. How
There are two common methods for empty mysqll table content: delete and truncate. The delete statement without the where parameter can delete all content in the mysql table. You can also use the truncate table to clear all content in the mysql table.
ON clause and WHERE clause are differentA simple method to better understand complex matching conditions with WHERE... is null clausesMatching-Conditions is different from Where-conditions.
A note ON "a left join B ON conditional expression"
ON
1. How to create an independent account and Set permissions
Here I use Navicat as my database management tool to open Navicat.
Select "user" -- "create user"
Enter the user name, host, and password. Note that the host name is not "localhost"
Start and Stop the mysql service in the window
Start mysql databaseNet start mysql
Stop a mysql databaseNet stop mysql
Restart the mysql databaseNet restart mysql
Command line format: use of basic mysql commands
1. Command Cancellation\ C
2. Exit
Drop table if exists [TEMP_TABLE_NAME];
Create temporary table [TEMP_TABLE_NAME] select col1, col2,... from [TABLE_NAME];
Alter table [TEMP_TABLE_NAME] add unique idx_col1 (col1 );
This warning problem occurs multiple times during the preceding
Recently, we have studied the implementation of MYSQL random extraction. For example, to randomly extract a record FROM the tablename table, the general syntax is: SELECT * FROM tablename order by rand () LIMIT 1.
However, I checked the MYSQL
(1) thoughts on improving database insertion Performance: Try to write Data to the Data File at a time and reduce the checkpoint operation of the database. The following four configuration items are modified:1) set the innodb_flush_log_at_trx_commit
When you installed Mysql on the machine for the first time, you can access the database anonymously or enter the database as a root without a password. in addition, if you are an administrator, you need to establish and authorize some users, which
1. Grant Permissions
Description: mysql is deployed on server A. Host B on the Intranet connects to server A through client tools for database operations. Server A needs to grant host B the permission to operate mysql.
1.1 log on to mysql on
1. Mysql errono 1005: The primary and Foreign keys are not completely consistentCheck the following points:
A. Does the field exist?B. Whether the types are consistent (pay attention to the unsigned and powerdesign generation issues)C. Database
One solution:
If an error occurs during Website access, check my. cnf: It is found that innodb_buffer_pool_size = 2048 M is too large and can be adjusted to innodb_buffer_pool_size = 1024M. There are other solutions to this problem on the Internet,
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.