In other words, I have a forum with two tables, one with the primary thread and the other with the reply. The primary key is the only field in the table that recognizes records, it is generally the post ID, which is reflected in the access time, for
(1) about the configuration file path
Sometimes, although I tried to modify some variables in the configuration file, they did not take effect. It was later discovered that the modified file was not the configuration file read by the MySQL server.
Assume that the table my_tbl contains three fields A, B, and C. Now we need to query the minimum value of Column B under each different value of column A in the table.
For example, the table record is:
A B C
1 3 'cd'
2 3 'nhd'
1 5 'bg'
The output result of the processlist command shows which threads are running. This command can be used to identify problematic query statements.
1. Enter mysqladmin processlist In the MySQL/bin directory;
2. Start MySQL and enter show
1. Modify the character encoding of a Database
Mysql> alter database mydb Character Set utf8;
2. Specify the character encoding when creating a database
Mysql> Create Database mydb Character Set utf8;
3. view the character encoding of the MySQL
When a primary key ID is deleted from the primary table, it cannot be deleted because the table associated with the primary key has related field data. I checked a lot of information and found that I used on restrict to create a table Association.
Data Table imported from Excel to MySQL database
I simply sorted it out:
Import Excel Data to MySQL database:1: select the data block to be imported. (Some people say there is an extra column. I don't need to do that after the test. I have exported
Program Introduction: Sometimes we want to know which tables are in a database and what fields are in the table. I wrote a small program to implement this function.
Ideas:1: connect to the database (nonsense)
2: obtain all the tables in the
MySQLProvides standard SQL mode matching and a Unix-like utility suchVI,GrepAndSed.
SQL mode matching allows you to use"_"Match any single character, while"%"Matches any number of characters (including zero characters ). In MySQL, the SQL mode is
MySQL performance optimization tips
Author: ye Jinrong (email :), source: http://imysql.cn, reproduced please indicate the translator and the source, and cannot be used for commercial purposes, offenders must investigate.
I. startup Parameter
In MySQL, a table of the InnoDB type uses a foreign key to reference the primary key in the MyISAM table. An error occurs during table creation!
For example, create a user table users
Create Table users
(
Id int not null primary key
Configure the MySQL database connection pool in Tomcat [Author: alias post: It lab hits: 11149 updated:]
1. Add the configuration information in $ catalina_home/CONF/server. XML to declare the specific information of the connection pool. Add the
From: http://www.cnblogs.com/StanBlogs/archive/2011/06/14/2080986.html
Preface:
This is my first time in contact with Linux, centos, and MySQL. After five days, I finally succeeded in the mysql-cluster architecture based on centos5.0. I will share
#!/Usr/Bin/EnvPython#-*-Encoding:UTF-8-*-"""Test MySQL connection and operations"""import MySQLdbConnstring ="Host = 'localhost', Port = 3306, user = 'root', passwd = '*****', DB = 'python '"# Connection stringTry:Conn =Mysqldb.Connect
Ubuntu navicat for MySQL installation:
1. Download The navicat8_mysql_cs.tar.gz File
2. decompress the tar file after the download.
A) running Terminal
B) First, CD the file to the folder you want to decompress on the terminal.
Java code
Summary:
The first point: the six are all dried into utf8.
Mysql> show variables like "% char % ";
+ -------------------------- + --------------- +| Variable_name | value |+ -------------------------- + --------------- +| Character_set_client | utf8
Author: skateTime: 2013/04/09
MySQL Character Set Summary
Today, my colleague, brother a, found a MySQL test server with garbled characters. He has recorded character sets before. I will try again today.
Modify the character set and default
Http://www.huanbaocity.com/index.php? Action = plugin & V = wave & TPL = Union & AC = viewgrouppost & gid = 76 & tid = 3876
Many people use MySQL to develop some projects. Sometimes, for the sake of performance, we directly use C language to
Http://topic.csdn.net/t/20031217/13/2573130.html
/*Name: mysqlclienttestAuthor: Kip Warner (kip@zero47.com)Date: 24/11/03Description: example to show usage of MySQL databases from client end.I did not have much time. Sorry...*/
// Includes...#
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