In Linux:
MySQL version: ver 14.14 distrib 5.1.41
1 .)
VI/etc/My. CNF, add default-character-set = utf8 under [mysqld], and add default-character-set = utf8 under [client]: WQ save and exit
2.) Run MySQL cmd, MySQL-> service MySQL
MySQL databases are used in the project as the backend. I have never used them before. I learned how to configure them,Record the process here for future use.After the installation is downloaded, go to the bin directory under the MySQL installation
The timestamp column type provides a type that you can use to automatically mark insert or update operations with the current date and time. If you have multiple timestamp columns, only the first one is automatically updated.
The first timestamp
The environment is jdk1.5 and atat5.0 mysql5.1. We need to ensure that the three parties are consistent in encoding, that is, the webpage, the handler, and the database. Assume that the current unified encoding is gb23121> JSP page must include 2>
# Cd/WWW# Mkdir mysqlbackup# Vi mysqlautobackup. ShThis mysqlautobackup. Sh file writes the following content:Filename = 'date + % Y % m % d'Mysql_bin_dir/mysqldump -- opt datename-u dateuser-pdatepassword |
================ Delete a database ================ drop database is used to cancel the table used in the database and cancel the database. Be careful when using this statement! To use drop database, you need to get the database drop permission.
Recently, I decided to install a working Apache 2.4/PHP 5.4 and MySQL 5.5 running locally on my Windows 7 laptop for web design.
InstallingAmp(Apache, MySQL and PHP) has become quite easier with single wizard based installations available as a
Address: http://database.51cto.com/art/201010/229404.htm
Next we will introduce you to the MySQL trigger new old for your reference. If you have encountered similar problems in MySQL trigger, you may wish to take a look and I believe it will help
Original article: http://www.cnblogs.com/end/archive/2011/03/31/2001109.htmlmysqlannotation
The MySQL Server supports three annotation styles:
· Start from the end of the line with the '#' character.
· From the '--' sequence to the end of the row.
This is an example of JDBC database query. It is strange that, after execution, only records with an even serial number can be queried. For example, if the database contains two data entries that meet the requirements, only the second data entry can
First, make sure that you have successfully installed hive and MySQL
Add the following to the hive-site.xml to specify the MetaStore address and Connection Method
javax. JDO. Option. connectionurl JDBC: mysql: // 10.20.151.10: 3306/hive?
1. Create the Stored Procedure drop procedure if exists sp_test;
Create procedure sp_test (
In P1 bigint,
In P2 char (64 ),
In P3 char (16)
)
Begin
-- Do somethings
End;
2. variables-define variablesDeclare _ id int default 0;-- Assign a value to
MySQL statement
First, explain the limit statement!Select * from Table limit parameter 1, parameter 2;Parameter 1: the start position of the database query. If you want to start from 20th, parameter 1 should be 20;Parameter 2: database query length.
The Java + JSP + tomcat6 + MySQL connection pool I recently saw on the Internet is mostly tomcat5. Many of them are not detailed and cannot be configured, which makes us very time-consuming and brainless, today, I finally successfully configured the
MySQL SummaryChange Character SetSet names utf8 will be modifiedCharacter_set_clientCharacter_set_connectionCharacter_set_results UseSet character_set_database = 'utf8
First download mssql driver: http://sourceforge.net/projects/jtds/files/
Unzip the downloaded file, copy the jtds-1.2.5.jar to Tomcat/lib.
Add a bean to the spring/infrastructure-config configuration file:
Other data sources are similar:
Spring
In some databases, there are cross tables, but this function is not available in MySQL. However, many friends on the Internet want to find a solution.Http://topic.csdn.net/u/20090530/23/0b782674-4b0b-4cf5-bc1a-e8914aaee5ab.html? 96198The solution is
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