Chat with a friend today and talk about a small problem in their company. As follows:
Table A equipment table, storage MAC address, province, city, district.Table B software table, store MAC address, software name.The function is to query the list
1.IFNULL statement: Ifnull (EXP1, EXP2), return EXP2 if EXP1 is null, return EXP1 if not null
The code is as follows
Copy Code
mysql> SELECT ifnull (null, 100);+-------------------+| Ifnull (NULL, 100) |+---------------
The first two days when you encountered data recovering data with the source command, the prompt package was too big an error. That package Mymanager exported, this time with MySQL with the Mysqldump tool successfully exported and imported into the
The specific resolution steps are as follows, hoping to help students who have the same problems:
Locate and modify the My.cnf file. Under different Linux systems, my.cnf are placed in different locations. Here is an example of Ubuntu server, and
mysq Index Type: normal index, unique index and primary index
1. General Index
The only task for a normal index (indexed by the keyword Key or index) is to speed access to the data. Therefore, only those that appear most frequently in the query
Recently encountered a requirement: MySQL in a table and B table have (ID, age) field, now you want to read the Age field of Table B and update it to the age field of the corresponding ID in table A, and I have a direct idea: Read B table in Python
1. Query, can not use * do not use, try to write full field name.
2. The more indexes are not the better, each table is controlled within 6 indexes. The index does not work in the case of a range where condition, such as where value
3. In most
1. System Architecture:
Using modular thinking, divided into 3 layers:
A. Data storage layer: Use MySQL to store all the data of BBS, including user information,
Article data, user letters, user messages, System data (?) ), Key issues:
Database
Mysql> SELECT * from pet WHERE name like "b%";
To find the name ending with "FY":Mysql> SELECT * from pet WHERE name like "%fy";
To find the name that contains a "w":Mysql> SELECT * from pet WHERE name like "%w%";
To find names that contain
MySQL's default encoding is Latin1, does not support Chinese, then how to modify the MySQL default encoding, the following take UTF-8 as an example to illustrate
After you start MySQL, log in to MySQL with RootMySQL > Show variables like '
Warning:mysql_connect () [Function.mysql-connect]: Premature end of data (mysqlnd_wireprotocol.c:554) in path/to/the/ file/where/connection/script/is/written/
Warning:mysql_connect () [Function.mysql-connect]: OK packet 1 bytes shorter than
Installed MySQL 5.5, found remote connection with the MySQL client, reported 1042-can ' t get hostname for the your address error, while the connection user has been authorized. This error means "your address can not get host name", I thought of the
1005: Failed to create table1006: Failed to create database1007: Database already exists, failed to create database1008: Database does not exist, delete database failed1009: Unable to delete database file causes database failure to be deleted1010:
But the data volume to 100,000, million to tens of millions, his performance can be so high? A little mistake, may cause the whole system rewrite, even more this system can not operate properly! Well, not so much nonsense. Use the facts to speak and
Transaction
BEGIN;COMMIT;A piece of code that modifies the two fields of the current table
First find it, save it in a variable, and add it to the value of the second field.
The code is as follows
Copy Code
Problem Analysis:
1, c:windowstemp folder permissions are not enough, at least to give the USERS group readable and writable permission;
2, C:windowstemp folder full of disk, the file is not written in, empty the TEMP folder;
3, third party
Forget MySQL Tutorial password processing method (Linux,windows)Here is a description of the MySQL password processing method, mainly in the different operating systems such as Linux and Windows to retrieve the password method
#/etc/init.d/mysql
Free VMIt allows you to quickly configure and run online, and is completely free of charge!Choosing your web hosting service provider is the most important step, and a successful website. It is important that you choose not only to meet the current
Generally, all redundant data (in the database principle, it is called the "third Paradigm") should be stored "). However, it is cost-effective to copy some information or create a summary table for higher efficiency.The stored procedure or UDFs
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