Suppose there are now the following N records indicating that the book is called
ID Author title
1 AAA AAA
2 BBB BBB
3 CCC CCC
4 DDD DDD
5 Eee AAA
Now you want to query all the title duplicates from these 5 records
Select DISTINCT Title,author from
View parameters: Show VARIABLES;
Set parameters: Set global parameter name =value, such as setting the maximum number of database connections to: Set global max_connections=1000.
Use the Shell>mysqld-help command to get a table of all MySQL options
So yesterday I seriously did a bit more functions, can be a variety of search engine statistical analysis. Can be viewed in multiple time periods. In fact, the code is very simple, in order to more concise, code compression to 6k. Divided into 6
Necessary knowledge:
MySQL Code:
In the MySQL installation directory, such as:
E:\Program Files\mysql\mysql Server 5.0\my.ini
You can find the code for the MySQL library, which in most cases can be set to uft-8:
Default-character-set=utf8
or
First look at where to start from where the garbled, as long as the unified code, there will be no garbled, the following to Uft-8 (personally think the best) as an example, detailed description:1, if the garbled is from the JSP page appears, JSP
As we all know, the current version of MySQL does not support direct recursive query, but through recursion to the iterative transformation of ideas, or in a sentence of SQL to implement the tree recursive query. This benefits from MySQL allowing
MySQL before the use of good, but today after the launch of MySQL entered the password appears in the Flash back, in Task manager found that the MySQL service did not start, when manually started when prompted to deny access. Find out the cause of
I modified it, can run normally, test environment for MYSQL5.0,XP
Key is set on the character set, set gbk,gb2312 test pass, UTF8 test failed
Set up database JJ before running the program, pay attention to the following parameters (modified for your
1. Stop to run MySQL:/etc/init.d/mysql stop
2. Use the Skip-grant-tables option to start MySQL:/usr/bin/mysqld_safe--skip-grant-tables &
3. You can now enter MySQL without the password.
# MYQL
> Use MySQL;
> UPDATE User SET
I. Password modification: Using the mysqladmin command1, for example, your root user does not have a password now, you want to change the password to ABC, then the command is: mysqladmin-u root password ABC2, if your root now has a password, then
This is the button click event on the page
Copy Code code as follows:
protected void Button1_Click (object sender, EventArgs e)
{
String tid = Utils.getrandom (32);
Stream MyStream = this. FileUpload1.PostedFile.InputStream;
If you encounter MySQL can not start the following situations: whether double-click mysqld.exe or use the command line, are not reflected. View My Computer-> Management-> Service and application-> service->mysql-> started with a path error or
A. php to connect to the database steps:
1 Establish a connection with the database:
$conn = mysql_connect ("localhost:3306", "username", "pass");
Three parameters: The first is the database server hostname and port localhost:3306, if the host
1. Example
Copy Code code as follows:
DELIMITER//
DROP PROCEDURE IF EXISTS ' test '. ' P_getvalue '/
CREATE definer= ' root ' @ ' localhost ' PROCEDURE ' p_getvalue ' (
in ID varchar (m), out s varchar (20)
)
Begin
if (length (ID) =11
I. Problems
To generate two types of data:
Class A: two-digit 01 02 03 ... 09 10 11 ... 19 20 21 ... 98 99
Another class B: three-digit 100 101 102 ... 110 111 112 ... 998 999
Ii. Solutions
1, build the table
Copy Code code as follows:
Win7 64-bit how to install the configuration mysql-5.7.5-m15-winx64
It's been a long time since MySQL was last installed. Steps of these, might be forgotten. Simply record it. (Refer to some blogs on the web.) )
1.mysql-5.7.5-m15-winx64.zip
Common code
Update ' table name ' Set click=click*0.01 where classid= ' 2 ' and click>2000
We often encounter random problems, and here's a way to solve random numbers.
When constructing test data, we need to insert random data
The code is like this:
$link =mysql_connect ("localhost", "root", "123456");
if (! $link) echo "No connection succeeded!";
else echo "Connection succeeded!";
?>
Where the red part can be modified according to their actual situation.
localhost:
The database migration (A-> B) requires that the user be migrated, while the user table (Mysql.user) has hundreds of users. There are 2 ways to migrate quickly:1, in the same version of the condition, directly back up a server MySQL database,
Because I personally need to install MySQL in this machine, the installation process will be recorded as follows, I hope to have reference to others.
First, download software
1. Access to MySQL official website, landing their own Oracle account,
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