Recently, I picked up MySQL again in the development project and encountered Chinese garbled characters when setting up the environment. I will share with you the solution below.
1. Show variables like 'character _ % '; shows all settings. Set the
The specific error is as follows:
Table '. \ tablename \ posts' is marked as crashed and shoshould be retried red
It indicates that the post table posts of the Forum is marked with an error and needs to be fixed. I remember a similar problem
Reference: JDBC setobject non-mainstream performance report [1]
The time type in MySQL and Java corresponds
MySQL time type
Time type corresponding to Java
Date
Java. SQL. Date
Year
Ava. SQL. Date
Reference: [problem] database connection pool
There are a lot of configuration methods on the Internet. I only record my configuration successful
1. Create context. xml in the META-INF folder of your web application as follows
1.0"Encoding
Reference: MySQL primary key Author: simaopig
A primary key is not clearly defined. It is an index and a unique index. It must be defined as a "primary key ".
Declaration method:
Create Table tbl_name ([field description omitted...], primary
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
Drop
Table
If
Exists
T_user;
Create
Table
T_user (ID
Int
Primary
Key
Auto_increment,U_uid
Varchar
(
1. First confirm that the server is in a secure state, that is, no one can connect to the MySQL database at will.Because, during the resetting of the MySQL Root Password, the MySQL database is completely out of password-freeOther users can log on to
Select * FromTablename limit pagesize*Pageno, pagesize # MySQL database page, which can automatically calculate the deletion records # pagesize*Pageno refers to the number of records that deviate from the first record in the record set.
Okay, I
// Go to the MySQL built-in Management Library: information_schema // Your own database: dbwww58com_kuchecarlib // Your own table: t_carmodelparamvalue MySQL > Use Information_schema; Database Changed MySQL > Select Data_length, index_
1. Stored Procedure name. SQL Use test; drop procedure if exists deleteconfigifdelcamera; delimiter // create procedure deleteconfigifdelcamera (in cameraid integer) Begin declare camera_id integer; select ID into camera_id from camera where id =
1. Install MySQL
2. Start the MySQL service and enter the following statement on the terminal: [root @ localhost/] # etc/init. d/mysqld start
Starting MYSQL: [OK]
3. log on to [root @ localhost/] # mysql-u Root4. view the database
Mysql> show
1. Connect to MySQL.
1. Connect to MySQL on the remote host.
Mysql-h110.110.110.110-uroot-pabcd123
2. Exit MySQL command: exit (Press ENTER)
II.Display operation
1. display the data table structure:
Mysql>Describe table;
2. database
First, add the login user permissions on the master server:
Grant replicate slave on *. * To 'username' @ 'host' identified by 'Password'
Set the my. ini file of the master server.Server-id = 1 # master server IDLog-bin # enable binary logBINLOG-
When backing up a database, the data table may have such a value array ('A' = 'B ',
'C' = 'D ')
Value in this format. During data export, the newline is replaced with \ n (in windows, Unix may be another symbol ). When you reply to data, if you
Therefore
CopyCode The Code is as follows: create_time datetime default now ()
It is impossible to set the default value.The alternative is to use the timestamp type instead of the datetime type.Current_timestamp: When I update this record, this
-- This article begins --
Apply a custom secret automaticallyVI my. CNF
[Client]
Host = localhost # indicates the name of the email, which is generally set to localhost.
User = root # user name, usually root
Password = 12345
ArticleDirectory
February 26 th, 2008
Record & Share
Map Mysql Data to memcached
February 26 th, 2008
Author: Zhang LibingSource: http://www.libing.name/2008/02/26/mysql-map-memcached.html
This article describes how to
Source:Http://chaoqun.17348.com/2008/08/memcached_work_with_mysql
This is the fotolog experience. It is said that fotolog has deployed 51 memcached instances on 21 servers and cached up to GB of content on 21 servers, this number is much larger
Http://lib.xiaop.net/article/mysql-optimization/
1. select the most suitable field attribute
MySQL can support access to large data volumes, but generally, the smaller the table in the database, the faster the query will be executed on it.
3. Add users:
(Note: Unlike the above, the following commands in the MySQL environment are followed by a semicolon as the command Terminator)
Format: grant select on database. * To username @ login host identified by "password"
First:
Add a
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