随着MysqL被oracle公司收购之后,越来越多的公司都把自己的数据库转移到了mariadb数据库上面,其实MysqL数据库和mariadb数据库的区别只是换个名字而已,内在的东西一模一样,下面我们就来说一下在centos6和centos7上如何正确的安装mariadb吧


centos7上:

centos7上的yum源里是自带mariadb数据库的,所以我们就给自己的虚拟机装上mariadb的服务器端和客户端,再设置一下密码就可以使用啦。

[root@J-7~]#yum-ygroupinstallmariadbmariadb-client#安装mariadb的服务器端和客户端
Loadedplugins:fastestmirror
Thereisnoinstalledgroupsfile.
Mayberun:yumgroupsmarkconvert(seemanyum)
base|3.6kB00:00:00
elpl|4.3kB00:00:00
Loadingmirrorspeedsfromcachedhostfile
ResolvingDependencies
-->Runningtransactioncheck
……
Verifying:perl-IO-Compress-2.061-2.el7.noarch14/14

Installed:
MysqL-python.x86_640:1.2.5-1.el7mariadb.x86_641:5.5.52-1.el7
mariadb-server.x86_641:5.5.52-1.el7mysql-connector-odbc.x86_640:5.2.5-6.el7

DependencyInstalled:
libtool-ltdl.x86_640:2.4.2-21.el7_2perl-Compress-Raw-Bzip2.x86_640:2.061-3.el7
perl-Compress-Raw-Zlib.x86_641:2.061-4.el7perl-dbd-mysql.x86_640:4.023-5.el7
perl-DBI.x86_640:1.627-4.el7perl-Data-Dumper.x86_640:2.145-3.el7
perl-IO-Compress.noarch0:2.061-2.el7perl-Net-Daemon.noarch0:0.48-5.el7
perl-PlRPC.noarch0:0.2020-14.el7unixODBC.x86_640:2.3.1-11.el7

Complete!
[root@J-7~]#systemctlstartmariadb.service#开启服务
[root@J-7~]#systemctlenablemariadb.service#设置为开机启动
Createdsymlinkfrom/etc/systemd/system/multi-user.target.wants/mariadb.serviceto/usr/lib/systemd/system/mariadb.service.
[root@J-7~]#ss-nutl#查看一下Mariadb的3306端口开启了没有
NetidStateRecv-QSend-QLocalAddress:PortPeerAddress:Port
udpUNCONN00*:12518*:*
udpUNCONN00*:29118*:*
udpUNCONN00*:68*:*
udpUNCONN00*:68*:*
udpUNCONN00:::12518:::*
udpUNCONN00:::24061:::*
tcpLISTEN050*:3306*:*
tcpLISTEN0128*:22*:*
tcpLISTEN0100127.0.0.1:25*:*
tcpLISTEN0128:::22:::*
tcpLISTEN0100::1:25:::*
[root@J-7~]#MysqL_secure_installation#用它自带的这个命令设置一些最基础的东西

NOTE:RUNNINgalLPARTSOFTHISSCRIPTISRECOMMENDEDFORALLMariaDB
SERVERSINPRODUCTIONUSE!PLEASEREADEACHSTEPCAREFULLY!

InordertologintoMariaDBtosecureit,we'llneedthecurrent
passwordfortherootuser.Ifyou'vejustinstalledMariaDB,and
youhaven'tsettherootpasswordyet,thepasswordwillbeblank,soyoushouldjustpressenterhere.

Entercurrentpasswordforroot(enterfornone):#没有密码要创建,按回车即可
ERROR1045(28000):Accessdeniedforuser'root'@'localhost'(usingpassword:YES)
Entercurrentpasswordforroot(enterfornone):
ERROR1045(28000):Accessdeniedforuser'root'@'localhost'(usingpassword:YES)
Entercurrentpasswordforroot(enterfornone):
OK,successfullyusedpassword,movingon...

SettingtherootpasswordensuresthatnobodycanlogintotheMariaDB
rootuserwithouttheproperauthorisation.

Setrootpassword?[Y/n]y#是否设置密码
Newpassword:#输入密码
Re-enternewpassword:#确认密码
Passwordupdatedsuccessfully!
Reloadingprivilegetables..
...Success!


Bydefault,aMariaDBinstallationhasananonymoususer,allowinganyone
tologintoMariaDBwithouthavingtohaveauseraccountcreatedfor
them.Thisisintendedonlyfortesting,andtomaketheinstallation
goabitsmoother.Youshouldremovethembeforemovingintoa
productionenvironment.

Removeanonymoususers?[Y/n]y#移除匿名登录?
...Success!

normally,rootshouldonlybeallowedtoconnectfrom'localhost'.This
ensuresthatsomeonecannotguessattherootpasswordfromthenetwork.

disallowrootloginremotely?[Y/n]no#关闭远程登录?
...Success!

Bydefault,MariaDBcomeswithadatabasenamed'test'thatanyonecan
access.Thisisalsointendedonlyfortesting,andshouldberemoved
beforemovingintoaproductionenvironment.

Removetestdatabaseandaccesstoit?[Y/n]y#移除测试数据?
-Droppingtestdatabase...
...Success!
-Removingprivilegesontestdatabase...
...Success!

Reloadingtheprivilegetableswillensurethatallchangesmadesofar
willtakeeffectimmediately.

ReloadprivilegetablesNow?[Y/n]y#确定你的配置?
...Success!

Cleaningup...

Alldone!Ifyou'vecompletedalloftheabovesteps,yourMariaDB
installationshouldNowbesecure.

ThanksforusingMariaDB!
[root@J-7~]#MysqL-uroot-p#登录
Enterpassword:#输入密码
WelcometotheMariaDBmonitor.Commandsendwith;or\g.
YourMariaDBconnectionidis12
Serverversion:5.5.52-MariaDBMariaDBServer

copyright(c)2000,2016,Oracle,MariaDBCorporationAbandothers.

Type'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputstatement.

MariaDB[(none)]>#正常使用

centos6:

centos6上默认的数据库是MysqL5.5的,这里我们要安装mariadb10.0的就得自己去Mariadb数据库的官方网站http://mariadb.org 下一个,来进行安装,如果你已经安装了自己卸载干净就行,我这里环境是最小安装的,这里我以二进制编译安装为例:

[root@localhost~]#rz#把自己下载的包传上来

[root@localhost~]#ls
anaconda-ks.cfginstall.loginstall.log.syslogmariadb-5.5.57-linux-x86_64.tar.gz
[root@localhost~]#getentpasswdMysqL#检查系统是否已经有了MysqL用户的信息
[root@localhost~]#useradd-r-d/app/data-s/sbin/nologin-u36MysqL#创建MysqL用户,指定家目录和默认shell
[root@localhost~]#idMysqL#查看一下用户信息
uid=36(MysqL)gid=36(MysqL)groups=36(MysqL)
[root@localhost~]#ll/app/data-d#看一下我们计划存放数据库的目录信息
drwxr-xr-x2rootroot4096Jul2800:34/app/data
[root@localhost~]#chownMysqL:MysqL/app/data/#修改目录的属组和属主
[root@localhost~]#tarxfmariadb-5.5.57-linux-x86_64.tar.gz-C/usr/local/#将二进制包解压放到指定位置
[root@localhost~]#cd/usr/local/
[root@localhostlocal]#ll
total44
drwxr-xr-x.2rootroot4096Sep232011bin
drwxr-xr-x.2rootroot4096Sep232011etc
drwxr-xr-x.2rootroot4096Sep232011games
drwxr-xr-x.2rootroot4096Sep232011include
drwxr-xr-x.2rootroot4096Sep232011lib
drwxr-xr-x.2rootroot4096Sep232011lib64
drwxr-xr-x.2rootroot4096Sep232011libexec
drwxr-xr-x12rootroot4096Jul2800:38mariadb-5.5.57-linux-x86_64
drwxr-xr-x.2rootroot4096Sep232011sbin
drwxr-xr-x.5rootroot4096Jul2720:51share
drwxr-xr-x.2rootroot4096Sep232011src
[root@localhostlocal]#ln-smariadb-5.5.57-linux-x86_64/MysqL/#给mariadb写一个软连接,切记不要后面的/
ln:target`MysqL/'isnotadirectory:Nosuchfileordirectory
[root@localhostlocal]#ln-smariadb-5.5.57-linux-x86_64/MysqL
[root@localhostlocal]#ll#查看一下
total44
drwxr-xr-x.2rootroot4096Sep232011bin
drwxr-xr-x.2rootroot4096Sep232011etc
drwxr-xr-x.2rootroot4096Sep232011games
drwxr-xr-x.2rootroot4096Sep232011include
drwxr-xr-x.2rootroot4096Sep232011lib
drwxr-xr-x.2rootroot4096Sep232011lib64
drwxr-xr-x.2rootroot4096Sep232011libexec
drwxr-xr-x12rootroot4096Jul2800:38mariadb-5.5.57-linux-x86_64
lrwxrwxrwx1rootroot28Jul2800:39MysqL->mariadb-5.5.57-linux-x86_64/
drwxr-xr-x.2rootroot4096Sep232011sbin
drwxr-xr-x.5rootroot4096Jul2720:51share
drwxr-xr-x.2rootroot4096Sep232011src
[root@localhostlocal]#llMysqL/#看一下MysqL文件夹的属组和属主
total192
drwxr-xr-x2rootroot4096Jul2800:38bin
-rw-r--r--1wangwang17987Jul1904:33copYING
drwxr-xr-x3rootroot4096Jul2800:38data
-rw-r--r--1wangwang8245Jul1904:33EXCEPTIONS-CLIENT
drwxr-xr-x3rootroot4096Jul2800:38include
-rw-r--r--1wangwang8694Jul1904:33INSTALL-BINARY
drwxr-xr-x3rootroot4096Jul2800:38lib
drwxr-xr-x4rootroot4096Jul2800:38man
drwxr-xr-x11rootroot4096Jul2800:37MysqL-test
-rw-r--r--1wangwang108813Jul1904:33README
drwxr-xr-x2rootroot4096Jul2800:38scripts
drwxr-xr-x27rootroot4096Jul2800:38share
drwxr-xr-x4rootroot4096Jul2800:38sql-bench
drwxr-xr-x3rootroot4096Jul2800:38support-files
[root@localhostlocal]#chgrp-RMysqLMysqL/#修改MysqL的属组
[root@localhostlocal]#llMysqL/
total192
drwxr-xr-x2rootMysqL4096Jul2800:38bin
-rw-r--r--1wangMysqL17987Jul1904:33copYING
drwxr-xr-x3rootMysqL4096Jul2800:38data
-rw-r--r--1wangMysqL8245Jul1904:33EXCEPTIONS-CLIENT
drwxr-xr-x3rootMysqL4096Jul2800:38include
-rw-r--r--1wangMysqL8694Jul1904:33INSTALL-BINARY
drwxr-xr-x3rootMysqL4096Jul2800:38lib
drwxr-xr-x4rootMysqL4096Jul2800:38man
drwxr-xr-x11rootMysqL4096Jul2800:37MysqL-test
-rw-r--r--1wangMysqL108813Jul1904:33README
drwxr-xr-x2rootMysqL4096Jul2800:38scripts
drwxr-xr-x27rootMysqL4096Jul2800:38share
drwxr-xr-x4rootMysqL4096Jul2800:38sql-bench
drwxr-xr-x3rootMysqL4096Jul2800:38support-files
[root@localhostlocal]#ll/etc/my.cnf#这个是系统自带的配置文件
-rw-r--r--.1rootroot251Jan2706:25/etc/my.cnf
[root@localhostlocal]#rpm-qf/etc/my.cnf#这个配置文件来自MysqL的包
MysqL-libs-5.1.73-8.el6_8.x86_64
[root@localhostlocal]#cat/etc/my.cnf#看一下这个配置的内容
[MysqLd]
datadir=/var/lib/MysqL
socket=/var/lib/MysqL/MysqL.sock
user=MysqL
#disablingsymbolic-linksisrecommendedtopreventassortedsecurityrisks
symbolic-links=0

[MysqLd_safe]
log-error=/var/log/MysqLd.log
pid-file=/var/run/MysqLd/MysqLd.pid
[root@localhostlocal]#cdMysqL#进入到MysqL文件夹
[root@localhostMysqL]#ls
bindataincludelibMysqL-testscriptssql-bench
copYINGEXCEPTIONS-CLIENTINSTALL-BINARYmanREADMEsharesupport-files
[root@localhostMysqL]#cdsupport-files/#查看一下support-files文件夹,里面全部都是模板文件
[root@localhostsupport-files]#ls
binary-configuremy-innodb-heavy-4G.cnfmy-small.cnfMysqL.server
magicmy-large.cnfMysqLd_multi.serverSELinux
my-huge.cnfmy-medium.cnfMysqL-log-rotate
[root@localhostsupport-files]#mkdir/etc/MysqL#创建一个存放我们自己配置的文件夹
[root@localhostsupport-files]#cpmy-huge.cnf/etc/MysqL/my.cnf#复制一个模板配置修改成适合自己用的
[root@localhostsupport-files]#vim/etc/MysqL/my.cnf
……
[MysqLd]
datadir=/app/data#存放目录
innodb_file_per_table=on#使用引擎(可不写)
skip_name_resolve=on#禁止解析(可不写)
port=3306
socket=/tmp/MysqL.sock
skip-external-locking
key_buffer_size=384M
max_allowed_packet=1M
table_open_cache=512
sort_buffer_size=2M
read_buffer_size=2M
……
[root@localhostsupport-files]#cd/usr/local/MysqL/#进入到MysqL文件夹
[root@localhostMysqL]#scripts/MysqL_install_db--user=MysqL--datadir=/app/data/#执行包带的脚本并指定存放地址和执行用户
InstallingMariaDB/MysqLsystemtablesin'/app/data/'...#一些关键说明
1707284:33:26[Warning]'THREAD_CONCURRENCY'isdeprecatedandwillberemovedinafuturerelease.
1707284:33:26[Note]./bin/MysqLd(MysqLd5.5.57-MariaDB)startingasprocess1872...
OK
Fillinghelptables...
1707284:33:27[Warning]'THREAD_CONCURRENCY'isdeprecatedandwillberemovedinafuturerelease.
1707284:33:27[Note]./bin/MysqLd(MysqLd5.5.57-MariaDB)startingasprocess1881...
OK

TostartMysqLdatboottimeyouhavetocopy
support-files/MysqL.servertotherightplaceforyoursystem

PLEASEREMEMBERTOSETAPASSWORDFORTHEMariaDbrootUSER!
Todoso,starttheserver,thenissuethefollowingcommands:

'./bin/MysqLadmin'-urootpassword'new-password'
'./bin/MysqLadmin'-uroot-hlocalhost.localdomainpassword'new-password'

Alternativelyyoucanrun:
'./bin/MysqL_secure_installation'

whichwillalsogiveyoutheoptionofremovingthetest
databasesandanonymoususercreatedbydefault.Thisis
stronglyrecommendedforproductionservers.

SeetheMariaDBKNowledgebaseathttp://mariadb.com/kborthe
MysqLmanualformoreinstructions.

YoucanstarttheMariaDBdaemonwith:
cd'.';./bin/MysqLd_safe--datadir='/app/data/'

YoucantesttheMariaDBdaemonwithMysqL-test-run.pl
cd'./MysqL-test';perlMysqL-test-run.pl
…………

https://mariadb.org/get-involved/

[root@localhostMysqL]#ls/app/data/#查看一下我们存放数据库的文件夹
aria_log.00000001MysqLMysqL-bin.000002performance_schema
aria_log_controlMysqL-bin.000001MysqL-bin.indextest
[root@localhostMysqL]#cdsupport-files/
[root@localhostMysqL]#pwd
/usr/local/MysqL
[root@localhostMysqL]#ll/app/data/
total1084
-rw-rw----1MysqLMysqL16384Jul2804:33aria_log.00000001
-rw-rw----1MysqLMysqL52Jul2804:33aria_log_control
drwx------2MysqLroot4096Jul2804:33MysqL
-rw-rw----1MysqLMysqL30379Jul2804:33MysqL-bin.000001
-rw-rw----1MysqLMysqL1038814Jul2804:33MysqL-bin.000002
-rw-rw----1MysqLMysqL38Jul2804:33MysqL-bin.index
drwx------2MysqLMysqL4096Jul2804:33performance_schema
drwx------2MysqLroot4096Jul2804:33test
[root@localhostMysqL]#ls
bindataincludelibMysqL-testscriptssql-bench
copYINGEXCEPTIONS-CLIENTINSTALL-BINARYmanREADMEsharesupport-files
[root@localhostMysqL]#cpsupport-files/MysqL.server/etc/init.d/MysqLd#复制一个启动服务脚本
[root@localhostMysqL]#chkconfig--listMysqLd#查看服务
serviceMysqLdsupportschkconfig,butisnotreferencedinanyrunlevel(run'chkconfig--addMysqLd')
[root@localhostMysqL]#chkconfig--addMysqLd#把MysqLd服务加进去
[root@localhostMysqL]#chkconfigMysqLdon#开机自启
[root@localhostMysqL]#chkconfig--listMysqLd#看一下服务
MysqLd	0:off	1:off	2:on	3:on	4:on	5:on	6:off
[root@localhostMysqL]#serviceMysqLdstart#启动服务
StartingMysqL.17072804:40:26MysqLd_safeLoggingto'/var/log/MysqLd.log'.#因没有日志文件夹报错
17072804:40:26MysqLd_safeStartingMysqLddaemonwithdatabasesfrom/app/data
/usr/local/MysqL/bin/MysqLd_safe_helper:Can'tcreate/writetofile'/var/log/MysqLd.log'(Errcode:13)
ERROR!
[root@localhostMysqL]#cat/etc/my.cnf#看一下系统自带的MysqL配置
[MysqLd]
datadir=/var/lib/MysqL
socket=/var/lib/MysqL/MysqL.sock
user=MysqL
#disablingsymbolic-linksisrecommendedtopreventassortedsecurityrisks
symbolic-links=0

[MysqLd_safe]
log-error=/var/log/MysqLd.log#日志正确存放地址
pid-file=/var/run/MysqLd/MysqLd.pid
[root@localhostMysqL]#touch/var/log/MysqLd.log#创建一个日志文件
[root@localhostMysqL]#chownMysqL/var/log/MysqLd.log#修改属主,给它个写的权限
[root@localhostMysqL]#serverMysqLdstart
-bash:server:commandnotfound
[root@localhostMysqL]#serviceMysqLdstart#启动服务
StartingMysqL.17072804:45:01MysqLd_safeLoggingto'/var/log/MysqLd.log'.
17072804:45:01MysqLd_safeStartingMysqLddaemonwithdatabasesfrom/app/data
.SUCCESS!
[root@localhostMysqL]#ss-ntl#查看一下端口,3306开启了
StateRecv-QSend-QLocalAddress:PortPeerAddress:Port
LISTEN050*:3306*:*
LISTEN0128:::22:::*
LISTEN0128*:22*:*
LISTEN0100::1:25:::*
LISTEN0100127.0.0.1:25*:*
[root@localhostMysqL]#MysqL#直接登录使用,报错命令没找到
-bash:MysqL:commandnotfound
[root@localhostMysqL]#pwd
/usr/local/MysqL
[root@localhostMysqL]#ls
bindataincludelibMysqL-testscriptssql-bench
copYINGEXCEPTIONS-CLIENTINSTALL-BINARYmanREADMEsharesupport-files
[root@localhostMysqL]#cdbin/
[root@localhostbin]#vim/etc/profile.d/MysqL.sh#写一个配置文件,把MysqL放到bin下
exportPATH=/usr/local/MysqL/bin:$PATH
[root@localhostbin]#./etc/profile.d/MysqL.sh#执行一下
[root@localhostbin]#MysqL#登录一下,可以匿名登录肯定不行啊,出去设置一下
WelcometotheMariaDBmonitor.Commandsendwith;or\g.
YourMariaDBconnectionidis2
Serverversion:5.5.57-MariaDBMariaDBServer

copyright(c)2000,2017,MariaDBCorporationAbandothers.

Type'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputstatement.

MariaDB[(none)]>exit
Bye
[root@localhostbin]#MysqL_se
MysqL_secure_installationMysqL_setpermission
[root@localhostbin]#MysqL_secure_installation#执行脚本,完成基本的安全设置
/usr/local/MysqL/bin/MysqL_secure_installation:line393:find_MysqL_client:commandnotfound

NOTE:RUNNINgalLPARTSOFTHISSCRIPTISRECOMMENDEDFORALLMariaDB
SERVERSINPRODUCTIONUSE!PLEASEREADEACHSTEPCAREFULLY!

InordertologintoMariaDBtosecureit,soyoushouldjustpressenterhere.

Entercurrentpasswordforroot(enterfornone):
OK,movingon...

SettingtherootpasswordensuresthatnobodycanlogintotheMariaDB
rootuserwithouttheproperauthorisation.

Setrootpassword?[Y/n]y#设置密码?

Newpassword:#第一次输入密码
Re-enternewpassword:#确认密码
Passwordupdatedsuccessfully!
Reloadingprivilegetables..
...Success!


Bydefault,andtomaketheinstallation
goabitsmoother.Youshouldremovethembeforemovingintoa
productionenvironment.

Removeanonymoususers?[Y/n]y#禁止匿名用户?
...Success!

normally,rootshouldonlybeallowedtoconnectfrom'localhost'.This
ensuresthatsomeonecannotguessattherootpasswordfromthenetwork.

disallowrootloginremotely?[Y/n]n#禁止root远程登录?
...skipping.

Bydefault,andshouldberemoved
beforemovingintoaproductionenvironment.

Removetestdatabaseandaccesstoit?[Y/n]y#移除系统的测试数据?
-Droppingtestdatabase...
...Success!
-Removingprivilegesontestdatabase...
...Success!

Reloadingtheprivilegetableswillensurethatallchangesmadesofar
willtakeeffectimmediately.

ReloadprivilegetablesNow?[Y/n]y#确认加载配置?
...Success!

Cleaningup...

Alldone!Ifyou'vecompletedalloftheabovesteps,yourMariaDB
installationshouldNowbesecure.

ThanksforusingMariaDB!
[root@localhostbin]#MysqL-uroot-p#登录
Enterpassword:#输入密码
WelcometotheMariaDBmonitor.Commandsendwith;or\g.
YourMariaDBconnectionidis10
Serverversion:5.5.57-MariaDBMariaDBServer

copyright(c)2000,MariaDBCorporationAbandothers.

Type'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputstatement.

MariaDB[(none)]>#安装完成

centos6.9 centos7.3 正确安装mariadb的姿势的更多相关文章

  1. 从iOS应用程序发送帖子到PHP脚本不工作…简单的解决方案就像

    我之前已经做了好几次了但是由于某些原因我无法通过这个帖子…我尝试了设置为_POST且没有的变量的PHP脚本……当它们未设置为发布时它工作精细.这是我的iOS代码:这里是PHP的一大块,POST变量不在正确的位置?我想这对于更有经验的开发人员来说是一个相当简单的答案,感谢您的帮助!解决方法$_POST是一个数组,而不是一个函数.您需要使用方括号来访问数组索引:

  2. Android – 将SQLite与MySQL同步的最佳方式

    参见英文答案>Synchronizingclient-serverdatabases5个我正在开发一个包含网络应用和移动应用程序的项目,该应用程序记录每日用户的数据.用户可以删除,更新他们的数据,他们可以使用许多设备插入数据.我打算这样开发:用户输入他们的数据然后插入sqlite.服务将定期启动(每5小时或每小时)以使用时间戳与MysqL同步.我确实在互联网上使用服务和时间戳搜索了一个样本,但我一

  3. android – 如何将唯一的GCM注册标识存储到MySQL中

    我正在设置GoogleCloudMessaging机制的服务器端,使用MySQL存储移动应用提供的注册ID.Google可以发出最多4k个注册码,我被迫将其存储在TEXT字段中.所有的好,到目前为止,问题是我必须处理这样的情况:>用户登录到应用程序>该应用从google请求注册ID>应用程序将新的注册ID发送到应用服务器>服务器存储该注册ID并将其链接到当前登录的用户>该用户注销并且新用户登录>应

  4. nodeJs链接Mysql做增删改查的简单操作

    本篇文章主要介绍了nodeJs链接Mysql做增删改查的简单操作,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

  5. PHP连接MYSQL数据库的3种常用方法

    这篇文章主要介绍了PHP连接MYSQL数据库的3种常用方法,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下

  6. PHP使用PDO创建MySQL数据库、表及插入多条数据操作示例

    这篇文章主要介绍了PHP使用PDO创建MySQL数据库、表及插入多条数据操作,结合实例形式总结分析了php基于pdo的mysql数据库创建、数据表创建以及多条数据插入操作相关实现技巧,需要的朋友可以参考下

  7. MybatisPlus如何处理Mysql的json类型

    这篇文章主要介绍了MybatisPlus如何处理Mysql的json类型,具有很好的参考价值,希望对大家有所帮助。如有错误或未考虑完全的地方,望不吝赐教

  8. 基于PHP+mysql实现新闻发布系统的开发

    这篇文章主要介绍了基于PHP+mysql实现新闻发布系统的开发,文章通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

  9. nodejs操作mysql实现增删改查的实例

    下面小编就为大家带来一篇nodejs操作mysql实现增删改查的实例。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧

  10. NodeJs使用Mysql模块实现事务处理实例

    本篇文章主要介绍了NodeJs使用Mysql模块实现事务处理 ,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

随机推荐

  1. 在airgapped(离线)CentOS 6系统上安装yum软件包

    我有一个CentOS6系统,出于安全考虑,它已经被空气泄漏.它可能从未连接到互联网,如果有,它很长时间没有更新.我想将所有.rpm软件包放在一个驱动器上,这样它们就可以脱机安装而无需查询互联网.但是,我在测试VM上遇到的问题是,即使指定了本地路径,yum仍然会挂起并尝试从在线存储库进行更新.另外,有没有办法使用yum-utils/yumdownloader轻松获取该包的所有依赖项和所有依赖项?目前

  2. centos – 命名在日志旋转后停止记录到rsyslog

    CentOS6.2,绑定9.7.3,rsyslog4.6.2我最近设置了一个服务器,我注意到在日志轮换后,named已停止记录到/var/log/messages.我认为这很奇怪,因为所有日志记录都是通过rsyslog进行的,并且named不会直接写入日志文件.这更奇怪,因为我在更新区域文件后命名了HUPed,但它仍然没有记录.在我停止并重新启动命名后,记录恢复.这里发生了什么?

  3. centos – 显示错误的磁盘大小

    对于其中一个磁盘,Df-h在我的服务器上显示错误的空白区域:Cpanel表明它只有34GB免费,但还有更多.几分钟前,我删除了超过80GB的日志文件.所以,我确信它完全错了.fdisk-l/dev/sda2也显示错误:如果没有格式化,我该怎么做才能解决这个问题?并且打开文件描述符就是它需要使用才能做到这一点.所以…使用“lsof”并查找已删除的文件.重新启动写入日志文件的服务,你很可能会看到空间可用.

  4. 如何在centos 6.9上安装docker-ce 17?

    我目前正在尝试在centOS6.9服务器上安装docker-ce17,但是,当运行yuminstalldocker-ce时,我收到以下错误:如果我用跳过的标志运行它我仍然得到相同的消息,有没有人知道这方面的方法?

  5. centos – 闲置工作站的异常负载平均值

    我有一个新的工作站,具有不寻常的高负载平均值.机器规格是:>至强cpu>256GB的RAM>4x512GBSSD连接到LSI2108RAID控制器我从livecd安装了CentOS6.564位,配置了分区,网络,用户/组,并安装了一些软件,如开发工具和MATLAB.在启动几分钟后,工作站负载平均值的值介于0.5到0.9之间.但它没有做任何事情.因此我无法理解为什么负载平均值如此之高.你能帮我诊断一下这个问题吗?

  6. centos – Cryptsetup luks – 检查内核是否支持aes-xts-plain64密码

    我在CentOS5上使用cryptsetupluks加密加密了一堆硬盘.一切都很好,直到我将系统升级到CentOS6.现在我再也无法安装磁盘了.使用我的关键短语装载:我收到此错误:在/var/log/messages中:有关如何装载的任何想法?找到解决方案问题是驱动器使用大约512个字符长的交互式关键短语加密.出于某种原因,CentOS6中的新内核模块在由旧版本创建时无法正确读取512个字符的加密密钥.似乎只会影响内核或cryptsetup的不同版本,因为在同一系统上创建和打开时,512字符的密钥将起作用

  7. centos – 大量ssh登录尝试

    22个我今天登录CentOS盒找到以下内容这是过去3天内的11次登录尝试.WTF?请注意,这是我从我的提供商处获得的全新IP,该盒子是全新的.我还没有发布任何关于此框的内容.为什么我会进行如此大量的登录尝试?是某种IP/端口扫描?基本上有4名匪徒,其中2名来自中国,1名来自香港,1名来自Verizon.这只发生在SSH上.HTTP上没有问题.我应该将罪魁祸首子网路由吗?你们有什么建议?

  8. centos – kswap使用100%的CPU,即使有100GB的RAM也可用

    >Linux内核是否应该足够智能,只需从内存中清除旧缓存页而不是启动kswap?

  9. centos – Azure将VM从A2 / 3调整为DS2 v2

    我正在尝试调整前一段时间创建的几个AzureVM,从基本的A3和标准A3到标准的DS2v2.我似乎没有能力调整到这个大小的VM.必须从头开始重建服务器会有点痛苦.如果它有所不同我在VM中运行CentOS,每个都有一个带有应用程序和操作系统的磁盘.任何人都可以告诉我是否可以在不删除磁盘的情况下删除VM,创建新VM然后将磁盘附加到新VM?

  10. centos – 广泛使用RAM时服务器计算速度减慢

    我在非常具体的情况下遇到服务器速度下降的问题.事实是:>1)我使用计算应用WRF>2)我使用双XeonE5-2620v3和128GBRAM(NUMA架构–可能与问题有关!

返回
顶部