The 12th chapter: Pythonの Network Programming Advanced (I.)

Source: Internet
Author: User
Tags rabbitmq

The main topic of this lesson
    • Introduction and operation of RabbitMQ
    • MySQL's introduction
    • Python Operation MySQL API

Introduction and operation of RabbitMQ

MySQL intro operation MySQL

Install MySQL, modify the following configuration file/etc/mysql/mysql.conf.d/mysqld.cnf, change the bind=127.0.0.1 to a special IP address, you can accept the remote login.

' MyUser '@'%'mypass'myuser  '@'%'; FLUSH privileges; EXIT;
Set Permissions
[Email protected]-ubuntu:~$ mysql-u myuser-h 172.16.201.134-P Enter Password:welcome to the MySQL Monitor. Commands End With; or\g.your MySQL Connection ID is5Server Version:5.7.15-0ubuntu0.16.04.1(Ubuntu) Copyright (c)+, Oracle and/orIts affiliates. All rights reserved. Oracle isA registered trademark of Oracle Corporation and/oritsaffiliates. Other names trademarks of their respectiveowners. Type'Help ;' or '\h'  forHelp. Type'\c'To clear the current input statement.mysql>
MySQL remote log in

User and Permissions actions
    1. Create Database
    2. Delete database drop databases
    3. Databases use database
    4. Creating User Create Users
    5. Specify Permissions GRANTS rights
Table Operations
    1. Creating table Create tables
    2. Delete Table drop tables
    3. Clear Table Transcate
    4. Creating a temporary table create temporary table
    5. Automatic Incremental Auto INCREMENT
    6. Primary KEY PRIMARY Key
    7. FOREIGN Key FOREIGN Key
    8. Constraint CONSTRAINT
    9. ALTER TABLE

Data manipulation

    1. New Data INSERT
    2. Deleting data Delete
    3. Updating Data Update
    4. WHERE
    5. JOIN
    6. GROUP by
    7. ORDER by
    8. INSERT into SELECT
    9. Output data to an external file
    10. Import data from an external file

Python API Operation MySQL
    1. Installing the Pymysql API
    2. Connect to MySQL

Homework this week

Job: A simple RPC (Remote call model)

    1. The commands and parameters that the server side will execute are sent to RABBITMQ,
    2. The client obtains the command to execute from RABBITMQ, and after the command executes, returns the result to the server side
    3. The server side accepts the command execution results from the client side and processes the
    4. Optionally specify a host or host group  

This assignment uses the following knowledge points:

    • RabbitMQ-RPC
    • SQLAlchemy, Paramiko, use MySQL to save the host corresponding relationship, and then use SQLAlchemy to create the table, execute the SQL statement, and finally assign the obtained host name to the Paramiko required host parameters

 

References

Silver Corner King: MySQL operation

Golden Horn King:

Other: RabbitMQ Chinese documents

The 12th chapter: Pythonの Network Programming Advanced (I.)

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.