The MySQL command under fedora is described in detail first. I am also just learning mysql. If something is wrong, please correct me and hope that I can help you with some experience. The following describes my installation:
1. My operating
Use the following method (navicat is used for MySQL management). Set the values of the following parameters and the following statements can be executed on the MySQL console.
CopyCodeThe Code is as follows: Show variables like '% timeout % ';
Show
Our requirement is to remove China from the address field and set the (province_id) field of the province with the data address field.
First, for string search, we can use the replace usage in MySQL. This blog also mentioned. See: http://www.jb51.
Normal MySQL connections will certainly be discarded because every time SQL injection is prevented, it is relatively slow.
Mysqli is an optimization made on the basis of common mysql. To be honest, the preprocessing method is successful, which
1. To test the trigger and stored procedure, first create a simple table:
Copy codeThe Code is as follows: create table 'airuser '(
'Userid' int (11) not null AUTO_INCREMENT,
'Username' varchar (128) not null,
Primary key ('userid ')
) ENGINE =
When mysql is compiled and installed in the source code below centos6.2, an egg error is reported during mysql Compilation:
Copy codeThe Code is as follows: [root @ vps870 mysql-5.5.28] # cmake-DCMAKE_INSTALL_PREFIX =/usr/local/mysql \
Recently, mysql Databases have encountered multiple numeric types, including int, bigint, smallint, and tinyint. The difference between int and smallint is confusing. Today, I searched for the following content on the Internet, and made a
This article introduces how to use the group_concat function in MySQL through examples, such as select group_concat (name ).
Group_concat function in MySQL
The complete syntax is as follows:
Group_concat ([DISTINCT] field to be connected [Order by
The index field is too long,
1. Modify the Field Length
2. Modify the default storage engine of mysql.
Add default-storage-engine = INNODB under [mysqld] of/etc/mysql/my. cnf
However, the INNODB engine must be used for database creation.
SQL
Create two user tables, user and user2. The table structure is the same, but the user table uses the InnoDB Storage engine, while the user2 table uses the MyISAM storage engine.
Copy codeThe Code is as follows: -- Table "user" DDL
Create table 'user
I. Concepts
MySQL Cluster uses a series of Disk Data objects to implement Disk tables.
Tablespaces: serves as a container for other Disk Data objects.
Undo log files: stores the information required for transaction rollback. One or more undo log
The Default value of timestamp is Default CURRENT_TIMESTAMP.
The timestamp is set to automatically update on update CURRENT_TIMESTAMP as the table changes.
HoweverA table can have at most one field set CURRENT_TIMESTAMPYou cannot set DEFAULT
Monitor SQL statement execution efficiency based on mysql slow logs
Enable MySQL log-slow-queries (slow query records ).
In Linux, find my. cnf file (usually in/etc/mysql/), and you may find that the file cannot be saved after modification, because
Operating System: Windows 7Mysql version: 5.5.22Www.2cto.comWhen you use the command mysqld -- install servicename -- defaults-file = 'file _ name' to create a mysql service, the systemThe system prompts that the service is successfully created, but
How can I access the mysql command line? There is a bin directory under the mysql installation directory. Use the command line to enter the directory, and then use mysql-uroot-p123456 to log on (note: the user name and password do not include
A single-precision floating point uses 4-byte (32bit) to represent a floating point.A computer floating point number that adopts the IEEE754 standard is represented in binary format internally.For example, 7.22 cannot be expressed in 32-bit
After MySQL is installed, a root user and an anonymous user will be automatically created, which is ignored by many users, this is probably because anonymous users are set to be only available locally by default.
However, if MySQL is to be used as
Connect to and disconnect the server
A MySQL user name and a password are usually required to connect to the server. If the server runs on a machine other than the login server, you must specify the Host Name:
shell> mysql -h host -u user -p
Enter
The following function implements string processing like an array.
I. Use a temporary table as an array
Copy codeThe Code is as follows: create function f_split (@ c varchar (2000), @ split varchar (2 ))
Returns @ t table (col varchar (20
SET: set global log_bin_trust_function_creators = 1;
1. Function func_splitStringTotal: splits the string according to the specified method and calculates the total number of units.
Copy codeThe Code is as follows: DELIMITER $
Create function
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