Add the following to the node in the tomcat_home/CONF/context. xml file:
Name = "JDBC/SQL"Auth = "Container"Type = "javax. SQL. datasource"Maxactive = "100"Maxidle = "30"Maxwait = "10000"Username = "root"Password = "root"Driverclassname = "com.
When using MySQL, you must pay attention to security issues. The following are 23 notes for MySQL:
1. If the connection between the client and the server needs to span and pass through an untrusted network, you need to use an SSH tunnel to encrypt
After research
After MySQL sets the encoding gb2312,
In navicat, select the MySQL Default Character Set, select the default character set when creating the database, and create the varchar field of the table (or its
Other character
We always hope to avoid full table scanning by the database engine when doing some queries, because the full table scan takes a long time, and most of the scans do not make sense to the client. Which of the following methods can be used in MySQL to
Summary of small tips commonly used in six MySQL statements
1) For example, to calculate the current size of a person, assume that the variable of the person's birthdate is @ dateofbirth,ThenSelect date_format (from_days (to_days (now ()-to_days
I will continue to solve the index problem of MySQL this time. There are still many principles that can be summarized as follows:
1. For composite indexes, if one of the leftmost query conditions is used,For example, if an index (a, B) exists,
We can see the concurrent_insert parameter today and explain it as follows:
The MyISAM storage engine has a system variable concurrent_insert, which is used to control its Concurrent Insertion behavior. The values can be 0, 1, or 2,
At the same time, the online access volume continues to increase. For servers with 1 GB of memory, the server even crashes every day or gets stuck from time to time. This problem has plagued me for using MySQL for more than half a month. scalable
Overview of log file types:1.The error log records the problems that occur when you start, run, or stop mysqld.My. ini configuration information:# Enter a name for the error log file. Otherwise a default name will be used.# Log-error =
The following describes how to use Bae to connect to MySQL. The basic call is the same as the related MySQL functions of PHP:
Mysql_query-send a MySQL Query
Mysql_fetch_array-get a row from the result set as an associated array, or number array, or
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 can log on. If a local user can use localhost, if you want to allow
Postfix + sasl2 installation Note: You have been installing Postfix + sasl2 for nearly a week and have passed MySQL authentication until the initial success in the afternoon. The steps and experience are summarized as follows: Determine the version
I. MySQL index type
MySQL currently only supports four types of indexes: Full-text, B-tree, hash, and R-tree.
B-tree indexes should be the most extensive indexes in MySQL, except for archive, which is supported by almost all storage engines.
1. Full-
There are two ways for MySQL to copy the same table structure: Create Table as and create table like. What is the difference?
Create Table T2 as select * from T1 where 1 = 2; or limit 0;
The T2 table (new table) created by as lacks the index
1. applications (such as PHP) execute MySQL statements in batches for a long time. The most common is collection or conversion of New and Old data.
Solution:
Add or modify the following two variables in the my. CNF file:
Wait_timeout =
First, go to the Linux system. The database is MySQL, which contains database: bugs.
Create a directory in/root: mkdir dbbak, and then create a directory in dbbak: mkdir bugsbak
VI mysql_bugs.sh/* Create a mysql_bugs.sh file */
Enter two rows of
The configuration in Tomcat, which was previously used, can be found:
factory
org. Apache. commons. DBCP. basicperformancefactory
driverclassname
org. gjt. Mm. MySQL. Driver
The autoreconnect = true argument to
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