當前位置:
首頁 > 知識 > Python 之自動獲取公網IP

Python 之自動獲取公網IP

0.預備知識

0.1 SQL基礎

ubuntu、Debian系列安裝:

1root@raspberrypi:~/python-script# apt-getinstallmysql-serverRedhat、Centos系列安裝:

1[root@localhost ~]#yuminstallmysql-server

登錄資料庫

1pi@raspberrypi:~ $ mysql -uroot -p -hlocalhost

2Enter password:3Welcome to the MariaDB monitor. Commands end with ; or g.

4Your MariaDB connectionidis36

5Server version:10.0.30-MariaDB-+deb8u2 (Raspbian)

6

7Copyright (c)2000,2016, Oracle, MariaDB Corporation Ab and others.

8

9Type help; or h forhelp. Type c toclearthe current input statement.

10

11MariaDB [(none)]>

其中,mysql是客戶端命令-u是指定用戶-p是密碼-h是主機

創建資料庫、創建數據表

創建資料庫語法如下

1MariaDB [(none)]>help create database

2Name: CREATE DATABASE

3Description:

4Syntax:

5CREATE [IF NOT EXISTS] db_name

6[create_specification] ...

7

8create_specification:

9[DEFAULT] CHARACTER SET [=] charset_name

10| [DEFAULT] COLLATE [=] collation_name

11

12CREATE DATABASE creates a database with the given name. To use this

13statement, you need the CREATE privilegeforthe database. CREATE

14SCHEMA is a synonymforCREATE DATABASE.

15

16URL: https://mariadb.com/kb/en/create-database/

17

18

19MariaDB [(none)]>


喜歡這篇文章嗎?立刻分享出去讓更多人知道吧!

本站內容充實豐富,博大精深,小編精選每日熱門資訊,隨時更新,點擊「搶先收到最新資訊」瀏覽吧!


請您繼續閱讀更多來自 python 的精彩文章:

總結學習 Python的14 張思維導圖匯總
Python裝飾器是精通Python的第一道關卡!看大牛是怎麼理解它的!
Python調用MySQL模塊初試
如何使用Python Impyla客戶端連接Hive和Impala
Python高薪系統學習班,機不可失失不再來

TAG:python |