Previously thought from top to bottom unified use of UTF-8 on the rest of the peace of mind, which knows today in the capture of Sina Weibo data or encounter character exceptions.
An exception is thrown when the data captured from Sina Weibo is
However, I am not going to describe the implementation details of a storage engine or the advantages and disadvantages of various storage engines. I just want to describe how MySQL handles BINLOG and clarify several obfuscation problems.
BINLOG is
Locate (substr, STR)
Position (substr in Str)
Returns the position of the substring substr that appears for the first time in the STR string. If the substring substr does not exist in STR, the return value is 0:
Mysql> select locate ('bar',
I once
Used backup methods include mysqldump, mysqlhotcopy, backup table, and select.
OUTFILE, or BINLOG backup, or directly copy data files and related configuration files. MyISAM
Tables are saved as files, so they are relatively easy to back up.
MySQL 5.6 will automatically hide the password information in the log. This is not just obfuscation, and then stores the unidirectional hash value in the log file. You can disable Password Hiding for log files by setting log-raw = OFF. The log-raw
The development environment of a company is usually deployed on the Intranet, and then there will be public servers for developers and tests. Therefore, there is often a need to connect to the server through ssh or a local mysql client, in my
The default encoding of MySQL is Latin1, which does not support Chinese characters. To support Chinese characters, you must change the default encoding of the database to gbk or utf8.
1. You need to log in as the root user to view the database
The innodb engine is different from myisam in terms of statistics. Myisam has a built-in counter. Therefore, when using select count (*) from table, you can directly retrieve data from the counter. Innodb must scan the entire table once to obtain
When creating a temporary table, you can use the temporary keyword. For example:
Copy codeThe Code is as follows: create temporary table tmp_table (name varchar (10) not null, passwd char (6) not null );
OrCopy codeThe Code is as follows: create
SQL mode matching allows you to use"_"Match any single character, while"%"Matches any number of characters (including zero characters ). In MySQL, the SQL mode is case-insensitive by default. The following are some examples. Note that = or! =;
After mysql is installed, there will be a database named mysql. The table for storing users is user, and the user management of mysql database is centered on this table. Of course there are some tables, such: tables_priv, procs_priv, clumns_priv,
DBI installation: DBI detailed information reference: http://dbi.perl.org/
1. Download the DBI package:Wget http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.620.tar.gz
2. Decompress
Tar xzf DBI-1.620.tar.gz
3. Enter the decompression package,
Preparations
1 download apache http://httpd.apache.org/download.cgi#apache24 httpd-2.2.22-win32-x86-openssl-0.9.8t.msi
Openssl indicates that the openssl module is included. You can use openssl to configure an SSL Secure link for Apache.
2
I. Download. Here we use the green decompressed version.
Http://mirror.services.wisc.edu/mysql/Downloads/MySQL-5.1/mysql-noinstall-5.1.32-win32.zip
2. Configure MySQL Parameters
1. decompress the green software to D: \ AppServ \ MySQL.Set system
Problem (Multiple Primary auto-growth IDs are repeated)
1: First, we use the test table structure of A and B.
2: Drop A, insert the data table test (with an auto-increment ID) on B, and return the insert ID as 1.
3: Stop B and insert the data
1. Check whether the firewall on the server does not block port 3306.
The default port of MySQL is 3306. Make sure that the firewall does not block port 3306. Otherwise, the remote connection to MySQL cannot be established through port 3306.
If you
MySQL queries the in operation. The query results are displayed in the in set order.
Copy codeThe Code is as follows: select * from test where id in (, 5) order by find_in_set (id, '3 ');
Select * from test where id in (3, 1, 5) order by
Back up the database:Go to cmd
Export all databases: Enter mysqldump-u [Database User Name]-p-A> [backup file storage path]
Export data and data structure: input: mysqldump-u [database username]-p [name of the database to be backed up]> [storage
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