BASIC script functions:
Automatic compression and backup of mysql Databases
Automatically Delete backup files from the past 10 days
The deletion progress is displayed.
#!/bin/bash#Author
Add:
Insert
Insert into Table Name (Field 1, Field 2, Field 3 ...... Field N) values (value 1, value 2, value 3 );
If you do not declare the fields to be inserted, all fields are inserted by default.
During insertion, note the table to which you
1. Use phpmyadmin to modify the TABLE. repair table 'your TABLE name' or directly on the database management interface, select a TABLE, as shown in figure
2. If the modification fails, we can try to stop mysql first when replacing the local mysql
MySQL auto-increment statements should be familiar and simple.Copy codeThe Code is as follows:Update 'info' set 'comments' = 'comments' + 1 WHERE 'id' = 32 This is fine, but sometimes we will involve subtraction,For example, the number of comments
1. The configuration file is correct and the cache is cleared.
1. if you encounter this problem, do not rush to reinstall the MySQL database. In fact, the solution is very simple. You need to clear the WIndows cache directory.
2. Press "windows key +
Create a user and assign permissions;Copy codeThe Code is as follows:Insert into mysql. user (Host, User, Password) values ("localhost", "phplamp", password ("1234"); // create a userGrant all privileges on dbname. * to 'username' @ '%' identified
1. Check whether the function is Enabled:Mysql> show variables like '% func % ';+ ----------------------------------------- + ------- +| Variable_name | Value |+ ----------------------------------------- + ------- +| Log_bin_trust_function_creators |
ExplainSelect t. order_sn, t. cust_code, ti. tms_order_other_info_id, sp. province_name, SC. city_name, sr. region_name, st. town_name, t. buyer_addressFrom tms_order t inner join tms_order_other_info ti on t. tms_order_id = ti. tms_order_idInner
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
1. First, use the system tool to locate the problem [top | nmon | dstat-dcnml | orzdba]:
The top command is used to view the resource usage of each process. Each metric is interpreted as follows [top f | 1 -- help ]:
Line 1: Current System Time,
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
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
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.
The following is an example of MySQL installation. It is installed using an executable file! Open the mysqlinstallation file mysql-5.0.27-win32.zip, decompress the file, and run “setup.exe. The following interface is displayed:
Mysql installation
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
In the previous collection script, the collection time is taken out in the form of unix timestamps. When writing SQL statements, you need to query the corresponding records by time, the $ time passed in on the page is a string like '2017-01'. How
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
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
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