MySQL command operations in Linux

Source: Internet
Author: User
The Shell script for batch creation of database tables in Linuxshell is as follows: # createdatabaseandtableHOST

The Linux shell batch create database/table Shell script is as follows: # create database and table HOST =

Create databases/tables in batches using Linux shell

The Shell script is as follows:

After the script is executed, the result is as follows:



MySQL slave common operation commands:

Show Database

ShowDatabases;

Switch Database
UseTop123;

Show database tables

ShowTables;

Modify primary key

Alter table gametop800 add primary key (Id);

Delete primary key

Alter table gametop800DropPrimary key;

Add composite primary key

Alter table gametop800 add primary key (Id, dtime);


If you are interested, you can use more complex syntaxes such as awk, cut, paste, regular expressions, and database operations to complete MySQL database operations.

The following describes how to capture webpages, extract features, extract information, summarize results, and insert data into databases in batches for permanent storage.

Example:

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.