The MySQL BACKUP command is mysqldump, which is included in the bin directory of the mysql installation package. Therefore, this command is run on the CMD end.
The command for restoring MySQL is source, which is run in MySQL CMD.
Backup:
Back up
In many cases, you may encounter the following situations when using Mysql:
For the sake of database security, the database administrator adds an "umbrella" to the database When configuring the database to protect the user's security and information
In MySQL, order by has two sorting methods:
1. Use ordered indexes to obtain ordered data
2. File Sorting
When you use explain to analyze and query, you can use ordered indexes to obtain ordered data and display Using indexes. The File Sorting
1. isolation level
(1) Read uncommitted (RU)
(2) Read committed (RC)
At the RC isolation level, each statement reads the updates of committed transactions. If other transactions are committed between two queries, the results of the two queries are
A problem occurred in the project over the past two days. An error is reported after mysql LIMIT is used.
This is the requirement. I have three tables: infor info table, mconfig material configuration table, and maaply material application form. The
Today, I don't know whether it is a good news or a bad news. When I used phpmyadmin to delete the test data, I actually deleted the entire table:
When an error occurs during the running of the program, the entire table is no longer displayed, and
Change Password:
Copy codeThe Code is as follows:// Select a databaseUse mysql;// Change the passwordUpdate user set password = password ('new password') where user = 'root ';// Takes effect immediatelyFlush privileges
Forget the administrator
ERROR 3 (HY000): Error writing file '/dev/shm/MYHTwgxT' (Errcode: 28)
Ask a friend to obtain the SQL statement run by the dev group and execute explain as follows:
Mysql> explainselect count (*) from (select STG_ITEM.ITEM_ID from (selectitem_label.
In Linux, MySQL installation has always been quite troublesome, because the previous installation was caused by complicated configurations. Today, you need to use Qt to connect to MySQL in Linux. Then install and configure one.
1) First, check
MySQL supports storing several objects inServerFor future use. Some of these objects can be called by program code as needed, some will be automatically executed when the data table is modified, and some can be automatically executed at the
Application scenarios:
To run the program for a long time, you need to query Mysql in almost the whole table and respond to data changes within the tolerable range.
Solution 1: update the time through the Mysql built-in table
Query scheme: SELECT
1. Do not save historical records or reduce the number of historical recordsModify/etc/profile to change HISTSIZE = 1000 to 0 or the number of items to be retainedClear. bash_history in the user's home path
Copy codeThe Code is as follows:Echo
Local Environment:
System: Fedora 20 (Linux should be the same)
Mysql: 5.6.
Remote Environment:
System: windows XP (in virtual machine)
Navcate for mysql: 10.0.111. Local Configuration
After the local MYSQL environment is fully configured, you only
1. Use RAND () to extract random rows in MySQL. The method for generating random numbers is the RAND () function. You can use this function together with the order by clause to perform random row extraction. The principle is that order by rand ()
Address: http://www.jbxue.com/db/12472.html
Common commands for creating and managing mysql databases:1. Use the SHOW statement to find out the current database on the server:Mysql> show databases;2. Create a database named MYSQLDATA.Mysql> create
A comprehensive technology for mysql optimization, mainly including
A: Table Design rationalization (in line with 3NF)
B: add an appropriate index. [four types: general index, primary key index, unique index unique, and full-text index]
C: Table
Back up a database using the mysqldump command
Basic Syntax: mysqldump-u username-p dbname table1 table2...> BackupName. SQL back up multiple databases
Syntax: mysqldump-u username-p -- databases dbname1 dbname2> bankupName. SQL back up all
When you use mysql's load data local infile syntax to insert a file, The following ERROR occurs: ERROR 1148 (42000): The used command is not allowed with this MySQL version.
The reason is: if-enable-local-infile is not specified during mysql
When you Join a table, use a column of equivalent type and index it.
If your application has many JOIN queries, you should confirm that the Join fields in the two tables are indexed. In this way, MySQL will launch a mechanism to optimize the Join
Create an index for a search field
An index is not necessarily a primary key or a unique field. If a field in your table is always used for search, create an index for it.
You can see the search string "last_name LIKE 'a % '". One is an index,
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.