MySQL is the Linux platform's most popular database system, today is the introduction of MySQL installation and simple operation Method!
Groupadd MySQL//set up MySQL user groupuseradd-g mysql mysql//MySQL account set upTAR-ZXVF
MySQL database has been applied to many internet companies, MySQL Rights management is very important, reasonable planning MySQL database permissions, security and use of the database is very beneficial. A good standard and habit, do not have a big
Environment: navicatformysql8.2+ MySQL Sever 5.1
Problem: MySQL graphical settings unique key
Workaround: The graphical tool does not have this function. You can use SQL commands.
One: Modify the table, for example
ALTER TABLE tablename ADD
A recent project needs to do a mysql+keepalived high available master-slave synchronization, together with course, but think of how to hang out in the main library, from the library after taking over, to the fastest speed to recover data, and let
In practical applications, there are 3 ways to analyze a single query SQL performance: Show status, show profiles, and slow query logs.
First, use show profile
1, the default is disabled, open in the session
#开启profileSet profiling=1;
2. When a
I. MySQL logical architecture
Second, the lock
1. Read and Write lock
Read locks are shared, are not blocking each other, multiple customers at the same time reading the same resources, complementary interference. Write locks are exclusive,
MySQL permission table refers to the MySQL database under the 5 tables: User, DB, Tables_priv, Columns_priv, Procs_priv, this 5 table records all the users and their permissions information, MySQL is through these 5 tables control user access. This
In my previous 2 blogs, I have briefly introduced the basic theory of partitioning technology after MySQL5.1 and the table storage files and features of partitioning technology, the blog address is as follows:
http://janephp.blog.51cto.com/4439680/1
Here goes the optimizer section in the previous article:
How MySQL executes associated queries
MySQL performs nested loops associated operations on any association, that is, to loop out a single piece of data in a table, and then to nest loops
MySQL provides the following three ways to get metadata for database objects:
1) Show statement
2 query related tables from INFORMATION_SCHEMA database
3 command line program, such as Mysqlshow, mysqldump
Get Meta data with show statement
MySQL
Today, colleagues found an error message when using a tool to connect to MySQL, as follows
If there is a problem, look at the error log, also found an error message, as follows
[ERROR] Incorrect definition of Table mysql.proc:expected column '
One notable feature of MySQL is its pluggable storage engine, so the MySQL file is divided into two types: one is the MySQL server itself files (mainly some log files, such as error log, binary log, etc.), all the storage engine sharing, and the
Official website
http://dev.mysql.com/downloads/cluster/
Mysql-cluster is actually the alias of the mysql7.0 version. But according to personal experience, in actual production, few people use. So write an article here as an introduction to
MySQL optimization is divided into three parts
1. Optimization of physical server hardware
MySQL every second, a large number of complex query operations, the disk of the 1/o has a high demand, usually considered 1/o is the most restrictive MySQL
We are not unfamiliar with the join statements for SQL statements. This is noteworthy for content filtering in the where statement, or for filtering in the on statement or having.
Case: To find a period of time to register new users, not through
Because of the need, from 4.0 direct upgrade to 5.0, look at the changelog, found that there are mainly the following changes:
I. Major changes from 4.0 to 4.1
If you created a InnoDB that contains TIMESTAMP fields in MySQL 4.1.0 to version 4.1.3
How to restore MySQL password
If you forget the MySQL root password, you can reset it in the following ways:
1. Kill off the MySQL process in the system;
Killall-term mysqld
2. Use the following command to start MySQL, to do not check the
In the mysqld section of my.cnf, add bind-address=127.0.0.1. You can make MySQL listen to only a specific address.
Q: How can I specify that MySQL only listens to a specific address?
A: A more common approach is to add bind-address=127.0.0.1 to
If you have recently made a select or update query, you may have used one or more MySQL comparison operators to limit the query's output. Comparisons are an integral part of most select queries, and MySQL provides many functions for this function;
130: The file format is not correct. (Not very clear of the wrong situation)
145: File cannot be opened.
1005: Failed to create table.
1006: Failed to create database.
1007: Database already exists, database creation failed.
1008: Database does
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