Select statement to remove duplicate information of a field, for example:
Table Name: Table
Id uid username message Dateline
1 6 A 111 1284240714 (timestamp)
2 6 A 222 1268840565
3 8 B 444 1266724527
4 9 C 555 1266723391
Execute the statement
Store the backup database under the D: root directory. The backup database name is backup20070713. SQL (20070713. SQL indicates the backup date)
Back up the database:
Mysqldump-uroot-p123456 database_name> D:/backup20070713. SQL
Restore
In fact, there is a difference between the two. last_insert_id () can return the ID of the bigint value. However, mysql_insert_id returns Int. If you
The ID of is unsigned Int or bigint. The returned result may be incorrect. Instead of
MySQL allows you to specify multiple statements for execution in a single query string by specifying parameters for the link:
CopyCode The Code is as follows: // set when linking
Mysql_real_connect (..., client_multi_statements );
// Or
// Specify
MySQL connector/net5.0:
Http://dev.mysql.com/get/Downloads/Connector-Net/mysql-connector-net-5.0.6.zip/from/pick
After installation,
Click properties, then find the target, click a directory to the upper level, and find binaries \. NET 2.0, and then
Example:
CopyCodeThe Code is as follows:
Generally, lazy is set to true instead of false, because if it is set to false, the corresponding sub-table will also be queried while querying the master table, added a lot
Three solutions:
1. Change the table method. It may be that your account is not allowed to log on remotely, but only on localhost. At this time, you only need to log in to MySQL on the computer of localhost, and change the "host" entry in the
MySQL writes data through common insert statements, such
CopyCode The Code is as follows: insert into person values (Zhang San, 20), (Li Si, 21), (Wang Wu, 70 )...;
However, sometimes to insert a large volume of data or exchange data more quickly,
CopyCode The Code is as follows: $ Memcached = array (// use the memcached multi-process to simulate multiple memcached servers. The cn En is the name of the memory server.
'Cn' => array ('192. 168.254.144 ', 192 ),
'En' => array ('192. 168.254.144 '
I,
Remove the ";" before the following parameters in PHP. ini:
CopyCode The Code is as follows:; Extension = php_dba.dll
; Extension = php_gd2.dll
; Extension = php_mbstring.dll
; Extension = php_mcrypt.dll
; Extension = php_mysql.dll
; Extension =
The following
Article This section mainly describes the actual operation procedures of some records of MSSQL to MySQL database, as well as the problems found in its actual operations, including table creation and encoding problems, the following
Put the script in/home/user/mysql_backup.sh
Crontab
# Crontab-l
# M h Dom mon Dow command
28 16 ***/home/user/mysql_backup.sh
The script is as follows:
CopyCode The Code is as follows :#! /Bin/sh
# Mysql_backup.sh: Backup MySQL Databases and keep
1> extract the compressed file mysql-noinstall-5.1.6-alpha-win32.zip to a directory, set mysql_home in the environment variable, and add % mysql_home % \ bin to path.
2> Create my. ini configuration file, content: [mysqld] # Set basedir to MySQL
For the description of the valid format of the value range of each type and the specified date and time value, see 7.3.6 Date and Time type.
Here is an example of using the date function. The following query Selects all records. The value of
The following articles mainly introduce the practical use of MySQL ALTER syntax. We all know that the proportion of MySQL ALTER syntax in actual application is still very large, so you can have a good idea about the practical use of MySQL ALTER
Configure MySQL under Fedora5 (MySQL documents of great reference include how to move the MySQL database location in the linux File System)
1. Download the MySQL Installation FileTo fully install MySQL, the following six files are
After installing ubuntu for a long time, I never used it. during the National Day, I had to go over and configure some basic development environments. As soon as I got started, I felt like ubuntu, and I couldn't tell why. Xampp was installed to test
1. Create a data table --- BASICS (skipped by experts)
Orthodox method: create [TEMPORARY] table name [if not exists]
(Column item definition created)
[Table options]
[Partition options]; # The Orthodox creation method. For specific parameters,
The solution is as follows:
1. Delete the mysql service first.
Control Panel-> Administrative Tools-> services, stop the mysql service first
Start-> Run-> Enter cmd-> SC delete mysql
Delete Service
2. modify my. iniIf it is not created (refer 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