阿里云 centos mysql_在阿里云的CentOS環境中安裝配置MySQL的教程

1 常規錯誤的yum安裝方法:

在前文中記述了CentOS 6.5系統中通過yum方式快速地搭建了LNMP環境,那么是否也能在CentOS 7或CentOS 7.1系統中依葫蘆畫瓢安裝MySql5.6.24呢?答案是否定的。

[root@typecodes ~]# yum -y install mysql mysql-server mysql-devel

.....................。

....省略部分安裝過程....

.....................。

Installed:

mariadb.x86_64 1:5.5.41-2.el7_0 mariadb-devel.x86_64 1:5.5.41-2.el7_0

Dependency Installed:

keyutils-libs-devel.x86_64 0:1.5.8-3.el7 krb5-devel.x86_64 0:1.12.2-14.el7 libcom_err-devel.x86_64 0:1.42.9-7.el7 libselinux-devel.x86_64 0:2.2.2-6.el7

libsepol-devel.x86_64 0:2.1.9-3.el7 libverto-devel.x86_64 0:0.2.5-4.el7 openssl-devel.x86_64 1:1.0.1e-42.el7.4 pcre-devel.x86_64 0:8.32-14.el7

zlib-devel.x86_64 0:1.2.7-13.el7

Complete!

從上面的安裝結果可以看出,沒有安裝mysql數據庫,而是安裝了mariadb數據!因為在CentOS 7和CentOS 7.1系統中,默認安裝的mysql是它的分支mariadb。這里引用下百度百科關于mariadb的描述:

MariaDB數據庫管理系統是MySQL的一個分支,主要由開源社區在維護,采用GPL授權許可 MariaDB的目的是完全兼容MySQL,包括API和命令行,使之能輕松成為MySQL的代替品。

因此,下面這些正常的MySQL操作都是無效的:

#######無法把mysql服務加入系統啟動

[root@typecodes ~]# chkconfig mysqld on

error reading information on service mysqld: No such file or directory

#######啟動不了mysql

[root@typecodes ~]# service mysqld start

Redirecting to /bin/systemctl start mysqld.service

Failed to issue method call: Unit mysqld.service failed to load: No such file or directory.

#######沒有安裝mysql相關包

[root@typecodes ~]# rpm -qa |grep mysql

php-mysql-5.4.16-23.el7_0.3.x86_64

[root@typecodes ~]#

2 正確的安裝方法:

眾所周知,Linux系統自帶的repo是不會自動更新每個軟件的最新版本(基本都是比較靠后的穩定版),所以無法通過yum方式安裝MySQL的高級版本。所以我們需要先安裝帶有當前可用的mysql5系列社區版資源的rpm包。

#######安裝rpm包

[root@typecodes ~]# rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

Retrieving http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

Preparing... ################################# [100%]

Updating / installing...

1:mysql-community-release-el7-5 ################################# [100%]

這時查看當前可用的mysql安裝資源:

[root@typecodes ~]# yum repolist enabled | grep "mysql.*-community.*"

mysql-connectors-community/x86_64 MySQL Connectors Community 14

mysql-tools-community/x86_64 MySQL Tools Community 17

mysql56-community/x86_64 MySQL 5.6 Community Server 139

從上面的列表可以看出, mysql56-community/x86_64 和 MySQL 5.6 Community Server 可以使用。

因此,我們就可以直接用yum方式安裝了MySQL5.6版本了。

[root@typecodes ~]# yum -y install mysql-community-server

Loaded plugins: axelget, langpacks

No metadata available for base

No metadata available for epel

No metadata available for extras

(Failed to load module fastestmirror: No module named fastestmirror)

repomd.xml | 2.5 kB 00:00:00

update mysql-connectors-community metadata successfully

(Failed to load module fastestmirror: No module named fastestmirror)

repomd.xml | 2.5 kB 00:00:00

update mysql-tools-community metadata successfully

(Failed to load module fastestmirror: No module named fastestmirror)

repomd.xml | 2.5 kB 00:00:00

update mysql56-community metadata successfully

No metadata available for updates

mysql-connectors-community | 2.5 kB 00:00:00

mysql-tools-community | 2.5 kB 00:00:00

mysql56-community | 2.5 kB 00:00:00

(1/3): mysql-connectors-community/x86_64/primary_db | 7.3 kB 00:00:00

(2/3): mysql56-community/x86_64/primary_db | 83 kB 00:00:01

mysql-tools-community/x86_64/p FAILED ============================================== ] 19 kB/s | 92 kB 00:00:00 ETA

http://repo.mysql.com/yum/mysql-tools-community/el/7/x86_64/repodata/3301d2eb425f300dec5a46c4201d08f2cf9232a6-primary.sqlite.bz2: [Errno 12] Timeout on http://repo.mysql.com/yum/mysql-tools-community/el/7/x86_64/repodata/3301d2eb425f300dec5a46c4201d08f2cf9232a6-primary.sqlite.bz2: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 3 seconds')

Trying other mirror.

(3/3): mysql-tools-community/x86_64/primary_db | 15 kB 00:00:00

Resolving Dependencies

--> Running transaction check

---> Package mysql-community-server.x86_64 0:5.6.24-3.el7 will be installed

--> Processing Dependency: mysql-community-common(x86-64) = 5.6.24-3.el7 for package: mysql-community-server-5.6.24-3.el7.x86_64

--> Processing Dependency: mysql-community-client(x86-64) = 5.6.24-3.el7 for package: mysql-community-server-5.6.24-3.el7.x86_64

--> Processing Dependency: perl(DBI) for package: mysql-community-server-5.6.24-3.el7.x86_64

--> Running transaction check

---> Package mariadb.x86_64 1:5.5.41-2.el7_0 will be obsoleted

---> Package mysql-community-client.x86_64 0:5.6.24-3.el7 will be obsoleting

--> Processing Dependency: mysql-community-libs(x86-64) = 5.6.24-3.el7 for package: mysql-community-client-5.6.24-3.el7.x86_64

---> Package mysql-community-common.x86_64 0:5.6.24-3.el7 will be installed

---> Package perl-DBI.x86_64 0:1.627-4.el7 will be installed

--> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-4.el7.x86_64

--> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-4.el7.x86_64

--> Running transaction check

---> Package mariadb-libs.x86_64 1:5.5.41-2.el7_0 will be obsoleted

--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.41-2.el7_0 for package: 1:mariadb-devel-5.5.41-2.el7_0.x86_64

---> Package mysql-community-libs.x86_64 0:5.6.24-3.el7 will be obsoleting

---> Package perl-PlRPC.noarch 0:0.2020-14.el7 will be installed

--> Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2020-14.el7.noarch

--> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.el7.noarch

--> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.el7.noarch

--> Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2020-14.el7.noarch

--> Running transaction check

---> Package mariadb-devel.x86_64 1:5.5.41-2.el7_0 will be obsoleted

---> Package mysql-community-devel.x86_64 0:5.6.24-3.el7 will be obsoleting

---> Package perl-IO-Compress.noarch 0:2.061-2.el7 will be installed

--> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch

--> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch

---> Package perl-Net-Daemon.noarch 0:0.48-5.el7 will be installed

--> Running transaction check

---> Package perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 will be installed

---> Package perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================================================

Package Arch Version Repository Size

=======================================================================================================================================================================

Installing:

mysql-community-client x86_64 5.6.24-3.el7 mysql56-community 19 M

replacing mariadb.x86_64 1:5.5.41-2.el7_0

mysql-community-devel x86_64 5.6.24-3.el7 mysql56-community 3.4 M

replacing mariadb-devel.x86_64 1:5.5.41-2.el7_0

mysql-community-libs x86_64 5.6.24-3.el7 mysql56-community 2.0 M

replacing mariadb-libs.x86_64 1:5.5.41-2.el7_0

mysql-community-server x86_64 5.6.24-3.el7 mysql56-community 58 M

Installing for dependencies:

mysql-community-common x86_64 5.6.24-3.el7 mysql56-community 256 k

perl-Compress-Raw-Bzip2 x86_64 2.061-3.el7 base 32 k

perl-Compress-Raw-Zlib x86_64 1:2.061-4.el7 base 57 k

perl-DBI x86_64 1.627-4.el7 base 802 k

perl-IO-Compress noarch 2.061-2.el7 base 260 k

perl-Net-Daemon noarch 0.48-5.el7 base 51 k

perl-PlRPC noarch 0.2020-14.el7 base 36 k

Transaction Summary

=======================================================================================================================================================================

Install 4 Packages (+7 Dependent packages)

Total download size: 83 M

Downloading packages:

mysql-community-devel-5.6.24-3.el7.x86_64.rpm | 3.4 MB 00:00:03

mysql-community-client-5.6.24-3.el7.x86_64.rpm | 19 MB 00:00:05

mysql-community-server-5.6.24-3.el7.x86_64.rpm | 58 MB 00:00:11

mysql-community-libs-5.6.24-3.el7.x86_64.rpm | 2.0 MB 00:00:02

perl-DBI-1.627-4.el7.x86_64.rpm | 0 B 00:00:01 ...

perl-DBI-1.627-4.el7.x86_64.rpm | 802 kB 00:00:00

(1/6): perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm | 57 kB 00:00:00

(2/6): perl-Net-Daemon-0.48-5.el7.noarch.rpm | 51 kB 00:00:00

(3/6): perl-PlRPC-0.2020-14.el7.noarch.rpm | 36 kB 00:00:00

(4/6): perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm | 32 kB 00:00:00

(5/6): perl-IO-Compress-2.061-2.el7.noarch.rpm | 260 kB 00:00:00

warning: /var/cache/yum/x86_64/7/mysql56-community/packages/mysql-community-common-5.6.24-3.el7.x86_64.rpm: V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY 00:00:01 ETA

Public key for mysql-community-common-5.6.24-3.el7.x86_64.rpm is not installed

(6/6): mysql-community-common-5.6.24-3.el7.x86_64.rpm | 256 kB 00:00:01

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Total 388 kB/s | 692 kB 00:00:01

Retrieving key from file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

Importing GPG key 0x5072E1F5:

Userid : "MySQL Release Engineering "

Fingerprint: a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5

Package : mysql-community-release-el7-5.noarch (installed)

From : file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Warning: RPMDB altered outside of yum.

Installing : mysql-community-common-5.6.24-3.el7.x86_64 1/14

Installing : mysql-community-libs-5.6.24-3.el7.x86_64 2/14

Installing : mysql-community-client-5.6.24-3.el7.x86_64 3/14

Installing : perl-Net-Daemon-0.48-5.el7.noarch 4/14

Installing : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 5/14

Installing : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 6/14

Installing : perl-IO-Compress-2.061-2.el7.noarch 7/14

Installing : perl-PlRPC-0.2020-14.el7.noarch 8/14

Installing : perl-DBI-1.627-4.el7.x86_64 9/14

Installing : mysql-community-server-5.6.24-3.el7.x86_64 10/14

Installing : mysql-community-devel-5.6.24-3.el7.x86_64 11/14

Erasing : 1:mariadb-devel-5.5.41-2.el7_0.x86_64 12/14

Erasing : 1:mariadb-5.5.41-2.el7_0.x86_64 13/14

Erasing : 1:mariadb-libs-5.5.41-2.el7_0.x86_64 14/14

Verifying : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 1/14

Verifying : mysql-community-common-5.6.24-3.el7.x86_64 2/14

Verifying : mysql-community-devel-5.6.24-3.el7.x86_64 3/14

Verifying : mysql-community-client-5.6.24-3.el7.x86_64 4/14

Verifying : perl-PlRPC-0.2020-14.el7.noarch 5/14

Verifying : mysql-community-server-5.6.24-3.el7.x86_64 6/14

Verifying : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 7/14

Verifying : mysql-community-libs-5.6.24-3.el7.x86_64 8/14

Verifying : perl-Net-Daemon-0.48-5.el7.noarch 9/14

Verifying : perl-DBI-1.627-4.el7.x86_64 10/14

Verifying : perl-IO-Compress-2.061-2.el7.noarch 11/14

Verifying : 1:mariadb-5.5.41-2.el7_0.x86_64 12/14

Verifying : 1:mariadb-devel-5.5.41-2.el7_0.x86_64 13/14

Verifying : 1:mariadb-libs-5.5.41-2.el7_0.x86_64 14/14

Installed:

mysql-community-client.x86_64 0:5.6.24-3.el7 mysql-community-devel.x86_64 0:5.6.24-3.el7 mysql-community-libs.x86_64 0:5.6.24-3.el7

mysql-community-server.x86_64 0:5.6.24-3.el7

Dependency Installed:

mysql-community-common.x86_64 0:5.6.24-3.el7 perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 perl-DBI.x86_64 0:1.627-4.el7

perl-IO-Compress.noarch 0:2.061-2.el7 perl-Net-Daemon.noarch 0:0.48-5.el7 perl-PlRPC.noarch 0:0.2020-14.el7

Replaced:

mariadb.x86_64 1:5.5.41-2.el7_0 mariadb-devel.x86_64 1:5.5.41-2.el7_0 mariadb-libs.x86_64 1:5.5.41-2.el7_0

Complete!

3 MySQL安裝完成后,進行相關配置

安裝完MySQL后,需要進行一些基礎配置工作:

#######安裝成功后,將其加入開機啟動

[root@typecodes ~]# systemctl enable mysqld

#######啟動mysql服務進程

[root@typecodes ~]# systemctl start mysqld

#######配置mysql(設置密碼等)

[root@typecodes ~]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL

SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current

password for the root user. If you've just installed MySQL, and

you haven't set the root password yet, the password will be blank,

so you should just press enter here.

Enter current password for root (enter for none):

OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL

root user without the proper authorisation.

Set root password? [Y/n] y [設置root用戶密碼]

New password:

Re-enter new password:

Password updated successfully!

Reloading privilege tables..

... Success!

By default, a MySQL installation has an anonymous user, allowing anyone

to log into MySQL without having to have a user account created for

them. This is intended only for testing, and to make the installation

go a bit smoother. You should remove them before moving into a

production environment.

Remove anonymous users? [Y/n] y [刪除匿名用戶]

... Success!

Normally, root should only be allowed to connect from 'localhost'. This

ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y [禁止root遠程登錄]

... Success!

By default, MySQL comes with a database named 'test' that anyone can

access. This is also intended only for testing, and should be removed

before moving into a production environment.

Remove test database and access to it? [Y/n] y [刪除test數據庫]

- Dropping test database...

ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist

... Failed! Not critical, keep moving...

- Removing privileges on test database...

... Success!

Reloading the privilege tables will ensure that all changes made so far

will take effect immediately.

Reload privilege tables now? [Y/n] y [刷新權限]

... Success!

All done! If you've completed all of the above steps, your MySQL

installation should now be secure.

Thanks for using MySQL!

Cleaning up...

4.可能有效的MySQL配置優化

在原始配置文件? /etc/my.cnf 基礎上,在 [mysqld] 節內增加配置參數。實際應用中,請按硬件及負載酌情修改。

#add by feng 120418 --------------------------

#skip-locking

skip-name-resolve

skip-external-locking

key_buffer_size = 256M

#table_cache = 3072

table_open_cache = 3072

read_buffer_size = 2M

read_rnd_buffer_size = 2M

sort_buffer_size = 2M

myisam_sort_buffer_size = 256M

thread_cache_size = 8

query_cache_size= 512M

query_cache_limit= 5M

tmp_table_size=1024M

max_heap_table_size=3000M

max_allowed_packet = 16M

innodb_buffer_pool_size = 512M

innodb_log_file_size = 512M

innodb_additional_mem_pool_size=512M

innodb_log_buffer_size=64M

max_connections=2000

max_user_connections=800

join_buffer_size = 8M

open_files_limit = 65535

#tmpdir=/dev/shm

max_connect_errors=1000

#add by feng 120418 end ---------------------

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/443249.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/443249.shtml
英文地址,請注明出處:http://en.pswp.cn/news/443249.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

mysql文件脫機_SQL數據庫的脫機與聯機操作

online : 可對數據庫進行訪問offline:數據庫無法使用1、使用查詢語句select state_desc from sysdatabases where name 數據庫名 2、使用databasepropertyex( database,property)函數select databasepropertyex( 數據庫 ,’ status )分離數據庫:EXEC…

dockerfile 安裝mysql_dockerfile構建mysql鏡像

使用dockerfile構建mysql,鏡像構建完成后,運行容器后,啟動mysql服務總是報錯Fatal error: Cant open and lock privilege tables: Table storage engine for db doesnt have this optionmysql安裝使用的官方的壓縮包mysql-5.7.20-linux-glibc…

ubunt11 安裝mysql_ubuntu 11.10安裝mysql

1. 安裝devadmdevserver:~$ sudo apt-get install mysql-server......The following NEW packages will be installed:libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient16libnet-daemon-perl libplrpc-perl mysql-client-5.1 mysql-client-core-5.1mysql-c…

mysql 取交集 php_mysql 查詢結果取交集的方法

本文將詳細介紹MySQL中如何實現以SQL查詢返回的結果集取交集的實現方法,需要的朋友可以參考1MySQL中如何實現以下SQL查詢(SELECT S.NameFROM STUDENT S, TRANSCRIPT TWHERE S.StudId T.StudId AND T.CrsCode CS305)INTERSECT(SELECT S.NameFROM STUDENT S, TRANSC…

mysql極客_極客mysql16

1.MySQL會為每個線程分配一個內存(sort_buffer)用于排序該內存大小為sort_buffer_size1>如果排序的數據量小于sort_buffer_size,排序將會在內存中完成2>如果排序數據量很大,內存中無法存下這么多數據,則會使用磁盤臨時文件來輔助排序&a…

mysql觸發器生成流水_利用mysql觸發器生成流水號

http://blog.csdn.net/bluestream/article/details/5755176利用mysql觸發器可以生成如日期(20100721)編號(0001)的流水號,編號每天都會從0001開始計算create table orders(orders_id int(10) primary key,customer_name varchar(100) );--------------------------------------…

linux 測試環境啟用jar_Linux下搭建測試環境

一、下載安裝包https://pan.baidu.com/s/1h-Nk8HcWKKtqbjrn0J_t1g 457jJDK1.8安裝包、Tomcat8安裝包本文用的遠程連接Linux操作系統的客戶端工具為Xshell,相關使用請自行百度二、安裝JDK1、先檢查該環境是否已經安裝過jdk。輸入java -version。如果有,…

代碼中 密碼存儲_你還記得瀏覽器自動存儲的密碼嗎?用js代碼恢復一下記憶吧...

哈嘍大家好我是無知便是罪專注于收集和分享互聯網上不為人知的好東西正常來說我們的手機和瀏覽器都有一個非常實用的功能就是可以自動的加密存儲我們的常用密碼了然后呢在我們需要的時候呢它可以自動填入進來非常非常的省時省力不過呢這種功能的我們用久了就很容易忘記自己當初…

mysql查詢男生基本情況_MySQL數據庫技術與應用:數據查詢

**摘要:**數據查詢是數據庫系統應用的主要內容,也是用戶對數據庫最頻繁、最常見的基本操作請求。數據查詢數據查詢是數據庫系統應用的主要內容,也是用戶對數據庫最頻繁、最常見的基本操作請求。數據查詢可以根據用戶提供的限定條件&#xff0…

mysql還是mdb2_mysql兩種表存儲結構myisam和innodb的性能比較測試

MyISAM:這個是默認類型,它是基于傳統的ISAM類型,ISAM是IndexedSequential Access Method (有索引的順序訪問方法)的縮寫,它是存儲記錄和文件的標準方法.與其他存儲引擎比較,MyISAM具有檢查和修復表格的大多數工具.MyISAM表格可以被壓縮,而且它們支持全文搜索.它們不是事務安全的…

numpy維度交換_如何將2個不同維度的numpy數組相乘

默認情況下,ND數組(例如A)與一維1(B)的乘法是在最后一個軸上執行的,這意味著乘法A * B僅在下有效A.shape[-1] len(B)要在另一個軸上將A與B相乘而不是-1,一種解決方法是在相乘前后交換A的軸:要在軸“ axis”上乘以A和B&#xff0c…

diff算法阮一峰_【重學數據結構與算法(JS)】字符串匹配算法(三)——BM算法

前言文章的一開頭,還是要強調下字符串匹配的思路將模式串和主串進行比較從前往后比較從后往前比較2. 匹配時,比較主串和模式串的下一個位置3. 失配時,在模式串中尋找一個合適的位置如果找到,從這個位置開始與主串當前失配位置進行比較如果未找…

遠程mysql定時刪除數據_mysql定時備份數據庫 刪除歷史文件 將備份數據庫傳送到另外服務器...

定時備份數據庫腳本并壓縮刪除歷史文件1.創建備份腳本vim mysql-backup.sh#!/bin/bashbakdate %y-%m-%d-%Htool/usr/local/mysql/bin/mysqldump$tool -uroot -p密碼 --lock-all-tables --all-databases | gzip > /路徑/$bak\.sql.gzfind 路徑 -name "name_*.sql.gz&q…

python input 拖入路徑 去除轉義 空格_python學習筆記(基礎-2)(轉載)

1.輸出用print()在括號中加上字符串,就可以向屏幕上輸出指定的文字。2.輸入如果要讓用戶從電腦輸入一些字符怎么辦?Python提供了一個input(),可以讓用戶輸入字符串,并存放到一個變量里。輸入是Input,輸出是Output&…

mysql和mdy_Liunx下安裝MySql

1.安裝數據庫:執行命令 yum -y install mysql-server2.啟動數據庫:安裝完畢,執行命令service mysqld start3.登錄數據庫:mysql -u root -p回車后輸入密碼(mysql的默認用戶名是root,密碼為空)4.使用數據庫:登…

python websocket服務器https_Socket與WebSocket以及http與https重新總結

Socket與WebSocket以及http與https重新總結一.Socket網絡中的Socket是一個抽象的接口 ,而是為了方便使用TCP或UDP而抽象出來的一層 ,可以理解為網絡中連接的兩端。通常被叫做套接字接口.二.WebSocketWebSocket就是其中一種,是為了創建一種雙向…

python微博評論爬蟲_詳解用python寫網絡爬蟲-爬取新浪微博評論 基于Python的新浪微博爬蟲研究...

怎樣爬取新浪微博的評論信息針對八爪魚在微博的應用上,除了用戶信息之外還包括話題內容方面的采集,目前絕大多數企業均在微博設有官方微博,八爪魚可以協助企業快速及時的抓取與企業產品相關聯的話題信息,規則市場內有配置好的規則…

韓順平 mysql sqlhelper類_(最全)韓順平jsp購物車源代碼(包含數據庫)

【實例簡介】韓順平的jsp購物車項目,所有源碼都在,包含數據庫,是網絡上最全的【實例截圖】【核心代碼】myshopping└── myshopping├── myshopping│ ├── src│ │ ├── com│ │ │ └── hsp│ │ │ ├── domain│ │ │ │ ├── B…

c#和python更適合爬蟲_python在爬蟲方面有哪些優勢呢?

python是一門非常不錯的編程語言,通俗易懂、適合零基礎入門,尤其是爬蟲領域有著獨特的優勢,成為了首選編程語言。Python是一種計算機程序設計語言,是一種動態的、面向對象的腳本語言。Python最初被設計用于編寫自動化腳本(shell)&…

mysql創建獨立表空間_InnoDB獨立表空間

在查看MySQL的數據庫文件的時候會發現,MyISAM存儲引擎類型的表會有三個文件,*.frm,*.MYD,*.MYI,但是InnoDB存儲引擎的文件只有一個*.frm,原來是因為InnoDB沒有開啟獨立表空間,執行如下命令可以看到:mysql&g…