Data table collect (ID, title, info, VType) on these 4 fields, which title with fixed length, info with text, ID is gradual, VType is Tinyint,vtype is index. This is a simple model of the basic news system. Now fill in the data and fill in 100,000
If you are not forgetting the password to modify the MySQL password method There are many, as the following
UPDATE User statement (Huitian record)
This must be done by logging into MySQL with the root account and then executing:
1. If you do not
MySQL serve is 5.1.x, the client is 5.0.x, with phpMyAdmin, there is always a hint that the version does not match, feeling bad. Use the Ports method to upgrade the client, no, no error. Said 5.1 and 5.0 conflict, can only be deleted first.
The code is as follows
Copy Code
Mysql>select * from xi_table into outfile ' D:test.xls ';
Export to TXT file:
The code is as follows
Copy Code
SELECT * from xi_table into outfile ' d:test.txt ';
COUNT (*) calculates the number of rows, including null
Count (column) calculates the number of rows for a particular column's value, and does not contain null values.
Count () is also used, and the use of Count (1) is the same as the result of
One, time lag
DateDiff: To put it bluntly is to use the first time to reduce the second time, the order can not forget
The code is as follows
Copy Code
Select DateDiff (' 2012-08-08 ', ' 2012-08-13 '); ---5
First we want to enter your MySQL server, use net stop mysql to stop MySQL, and then run the DOS command, enter CMD in the run, and then switch to the MySQL bin directory, run the command:
The code is as follows
Copy Code
There are 2 ways to resolve this problem:
localhost change to%
Go to MySQL Bin directory
The code is as follows
Copy Code
Mysql-u root-pMysql>use MySQL;Mysql>update User Set host = '% ' where user = ' root
To install a document:Http://code.openark.org/forge/mycheckpoint/documentation/quick-howto#Install
Demand:1. Need to install Python, and version is greater than 2.4
Shell > Phthon See if there's any outfit, no
Yum install Python2. Need to install
method One , everyone most commonly used phpMyAdmin modification method, first we want to log in phpMyAdmin
We can see the change password
Enter your own new password
Click on execution to modify the password successfully
method Two , SQL
MySQL data to import export 500MB data
Problem: 500M of the library table data needs to be imported into the new database.
First access to MySQL through the consoleMysql-u Root-p 12345CREATE DATABASE ' demo ' DEFAULT CHARACTER SET UTF8 COLLATE utf8
Databases are IO-intensive applications whose primary responsibility is data management and storage. And we know that the time to read a database from memory is a microsecond level, while reading an IO from a common hard disk is at a millisecond
Verification of the user name and password process, we usually do a system, many times will involve the authentication. Today we'll see how MySQL is coming in.
Row validation. (Note is login, not login ^_^)
First, the principle of
MySQL is a non-holding relay function and MYSQLI is a permanent connection function. Other words
MySQL each link will open a connected process and mysqli run mysqli multiple times will use the same connection process, thereby reducing the cost of
Only SQL functions can be used in a SELECT statement to manipulate fields (linked SQL Server).Select field 1 from Table 1 where field 1. IndexOf ("cloud") = 1;The reason this statement is not correct is that the indexof () function is not a SQL
If you have forgotten the root password locally, try the following methods:
Open cmd first stop MySQL service
net stop MySQL
Enter the Bin folder in the MySQL installation directory and enter
Mysqld-nt--skip-grant-tables
Skip Password detection
LTrim function
The code is as follows
Copy Code
Mysql> Select Concat ('. ', LTrim (' ddd '), '. ');
RTrim function
The code is as follows
Copy Code
Mysql> Select Concat ('. ', RTrim
In Linux, there are usually no garbled characters. Recently, many of my friends have asked me this problem in Windows. Now let's take a look at it.1. in the mysql database, the default database type is latin1. You must change the default data type
$ Hostname = "localhost"; // defines the name of the connected mysql server$ Username = "root"; // defines the user name used for connection.$ Password = ""; // defines the password used for connection.$ Link = mysql_connect ($ hostname, $ username,
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