Mind Mapping Linux Shell Introduction The dry article MySQL database script management system

Source: Internet
Author: User

Results-oriented learning is the most efficient learning. I used to learn Linux shell programming by go out. Give me the feeling is, today learned, the day after tomorrow forget, a week after the white school.

Fortunately, recently I usually do not have anything, has been according to <linux Shell Raiders, learn to do some small examples, look at their own shell program, a few simple lines of the program, to achieve some fun effect, full of confidence. Unconsciously, slowly persisted for 2 weeks.

Tell me about your dry goods. is actually a Linux operation MySQL database script management system .

function is not complex, that is, in peacetime work, the author to maintain a number of business systems, these business systems are similar to the main functions, the main difference is the regional database and business a little difference.

Menu Page

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/49/wKioL1TPEYaw_bo1AAJnQpUCZlg138.jpg "title=" 1.png " alt= "Wkiol1tpeyaw_bo1aajnqpuczlg138.jpg"/>

System implementation Purposes

Maintain local utility database system. The following five data maintenance functions are now mainly available in the city. Including Qingdao, Shanghai, Wuhan, Chengdu, Guangzhou. Through the system, enter several parameters, you can easily complete the complex data initialization work.

Key features include

    • Create a database

    • Initialize e-commerce data by Ground city

    • Deleting a database

    • Verifying the validity of the e-commerce database data


constraint conditions

The following conditions must be used for the system

    1. the script needs to be uploaded to the Linux host. The Linux host guarantees that the MySQL client is installed ( can operate the MySQL command )

    2. Have access to the target database

    3. Execute chmod +x *.sh command to Add Execute permissions for all SH files


Catalogue

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/59/49/wKioL1TPEd7TxplsAAEwfRb0l24578.jpg "title=" 2.png " alt= "Wkiol1tped7txplsaaewfrb0l24578.jpg"/>

which

folders Chengdu,Guangzhou,Shanghai,Wuhan, andQingdao initialize scripts for the database.

If you add a new city file in the future, you can add a new directory (Hebei), and then add the initialization script to the directory, which is the completion of the function extension.

function.sh: Functional Shell

menu.sh: Menu Shell

OneKey: main Shell

valid.sh: Verify Shell


Create a database

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/59/4C/wKiom1TPETqB5yyzAALNu6ah-MM480.jpg "title=" 2.png " alt= "Wkiom1tpetqb5yyzaalnu6ah-mm480.jpg"/>

altogether 5 steps

1) input Option 1

2) Enter the target database IP

3) Enter the target database user

4) Enter the target database user password

5) Enter new database name (case sensitive)

6) Complete (a new empty database complete , character set UTF8)


Import e-commerce data

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/49/wKioL1TPEkqi67kbAAMc43KqzMA034.jpg "title=" 2.png " alt= "Wkiol1tpekqi67kbaamc43kqzma034.jpg"/>


altogether 6 steps

1) input Option 2

2) Enter the target database IP

3) Enter the target database user

4) Enter the target database user password

5) Enter new database name (case sensitive)

6) Select the e-Commerce area type (Qingdao,wuhan,shanghai,chengdu,guangzhou)

7) Complete (data already initialized)


Verify the validity of the e-commerce data data

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/59/4C/wKiom1TPEYrA2dERAASai3xh6EE211.jpg "title=" 2.png " alt= "Wkiom1tpeyra2deraasai3xh6ee211.jpg"/>

Verify the correct situation


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/49/wKioL1TPEp_gpV8TAAIoq62iI8g949.jpg "title=" 3.png " alt= "Wkiol1tpep_gpv8taaioq62ii8g949.jpg"/>

Validation failure condition


altogether 6 steps

1) input Option 4

2) Enter the target database IP

3) Enter the target database user

4) Enter the target database user password

5) Enter new database name (case sensitive)

6) Enter the taxpayer Identification number ()

7) Output verification results (e-commerce platform information, taxpayer information, balance situation, template situation, etc.)


Deleting a database


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/59/4C/wKiom1TPEd-QIIRjAAMGVweVURA822.jpg "title=" 3.png " alt= "Wkiom1tped-qiirjaamgvwevura822.jpg"/>


altogether 5 steps

1) input Option 5

2) Enter the target database IP

3) Enter the target database user

4) Enter the target database user password

5) Enter new database name (case sensitive)

6) Delete database hint information


The script is in the attachment

This article is from a "simple" blog, so be sure to keep this source http://dba10g.blog.51cto.com/764602/1610653

Mind Mapping Linux Shell Introduction The dry article MySQL database script management system

Related Article

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.