解决:wordpress error establishing a database connection problem
我是个网站菜鸟,刚开始搭建LAMP环境的时候,就要了我半条老命。
没办法,懂的东西太少,LAMP是什么我都不懂,域名是什么,我也被不懂,为什么想要有个网站就要有服务器我还是不懂。一步步地自己去钻,去看digitalocean给的说明教程。慢慢就懂了。
我的VPS(Virtual Private Server虚拟专用服务器)的配置很low,CPU只有512M- -
最开始解决这个问题,就是重启我的服务器
reboot
httpd -k restart
以上两个代码用的飞起,实际上如果是database crash了,以下两个命令应该就ok了
systemctl start mariadb
systemctl status mariadb
好吧,问题来了。刚开始的时候,我发现error establishing这个问题的时候,我根本不知道怎么回事。后来这几天学了一下mysql的配置才知道。首先,我想要描述一下,解决问题的步骤。
1、发现error establishing a database connection的问题——稍微google一下就知道是数据库的问题
2、去查数据库mysql的err log。具体位置应该是在/var/log下面
3、查了以后我就发现是 out of memory,cannot allocate innodb buffer pool=128M(内存只有512M你让我怎么办)的问题了
4、google了一下,这种问题有两种解决方法:
有一种方法就是增加swap文件(下面详细介绍swap空间及其增加方法):digitalocean的add swapfile教程
还有就是要修改你的innodb_buffer_pool_size(下文详细介绍)
Swap空间:
Swap分区在系统的物理内存不够用的时候,把硬盘空间中的一部分空间释放出来,以供当前运行的程序使用。那些被释放的空间可能来自一些很长时间没有什么操作的程序,这些被释放的空间被临时保存到Swap分区中,等到那些程序要运行时,再从Swap分区中恢复保存的数据到内存中。
swapon -s
如果你没有配置swap空间,发现敲完上面的命令,什么也没有,如果你配置了,就会出现下面的情况,我在我的VPS上配置的是4G:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoYAAAAvCAIAAADxZJwhAAAJsElEQVR4nO2dy6scRRTG6++Z/0NFWhAjgWCiKIrYPhaCIGYrJbhw5VIQS1zoRgRRIwMiuFEJBDSRSDAXFXwQDFmIFtGgi37UOVXnVHfP7dfc+X4I5lb3nK6unqqvT/V0feblNz/+8tvrdz1w1gAAAABgIbz35pW3Pv3q8tHdp84tXRljCrutcOXSVQE92JTOFqaw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YAAABWASQZAAAAWAWQZAAAAGAVQJIBAACAVdAhyfB3AgAAAOYhL8n6MiiTof00HD7NAPRn//tRYZOVFZrV/uN6ZlZiEONoTsChXNu/33Ao14ctPcECafUfWj41WvuDEclJ8gIp8vClUJHHAxCz//2odFtbxr7t1Sp+cT2JS096w5HGoYs7cic6FoetBimWa2j10Yznlf3pYpb0uFr51KjtD0YlI8nC5U79MrllZHP71q5KHdYh2JAIsj+rtrDcKD7NABwIJ6Af1cokalgiCZtIcElVc3Gaz7LVpaW1qbVyDbU+yme1/Wk5radWPhOQ5IlRJVn09RT8MjOOGaL/se7P2h5DrOjxfZoBOBT2uR+FIaGfJNMsMzKs0eOE5fXlwKQBezkj9aiPOnGt7c9zGqHyi6QckOSJ0SRZnBGRn09V3/fGT4bfFW6FD8j+rO0fxxxK4PMKwD73I823od0smri3e1Mnq1ycZh81S95ZkpX6xAeO5uTT/QtLsmFLXZjk8nHI2icYSPLkyJLcPR/Cnn+4clNYVxbWlYXs7UZ1N2dMOcLdPXxewcFzMvpRzyw52dwrTrI/U0k2cS2X90Nrxu5yzaC3p3HvVECSJ0aUZPlHA5pfpimstdaVG1NY51yYNhL9j3V/1vhTnOP7NANwKJyMfjRckuWRi8ehs3TMGY+knJEMy+U9oPtTV+ToeZ24v+wrr5fPBCR5YgRJ1jqt6pcZLLjjzLidNKr9j2uTY9mfNZ4pU+xEd/NpBuBAOBn9qK2Wajjc3nNo73spcTLPYsP58jhaeUfVM3HocdX9My+yLXBRMr7OYERSSZ785nhlb1sAAAAAq2DuBTXhzwoAAACIYI1rAAAAYBVAkgEAAIBVAEkGs/Cf8h8AAIAG7/3/8AdN9vb3X0UAAAAASUVORK5CYII=" alt="" />
还有一种方法就是用free,它会显示出系统整体的内存使用情况:
free -m
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAn0AAAA8CAIAAACcipt6AAAJrklEQVR4nO2d3aGkIAxGrcdWrIRCKIQ6prl98IcACYo7zlU552V3GC8ihMSgwzcM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gJ/AAAAAElFTkSuQmCC" alt="" />
2、查看可用的硬盘空间,因为swap空间实际上要用的是硬盘空间,所以,当然你要查看还有多少硬盘可用
df -h
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAewAAACFCAIAAAAWxFwRAAARcklEQVR4nO2d27WsuA5FiYdUKoKO4A4S6AwIhDgquNsfvCRbMi9D2ew5R3+cZlO2kfFCGLxo/vnfvw0AAFQKIg4AUDGIOABAxRQh4p/+OzJ0v27KT2m7of80n37o2l83BQAqIRDxthsmNX1MRtpumKv79N/+k7n4bnj2cLaZLllGm9pu6D+jkh8uUF//lsvi93smpONpkL0vACA/sYjfJ3imOqka70lC7zymk9hx/vTfMyLejIELSr/WwOZUMwDgcTZFfEzNh66dk/R1aE8bomzP2N6KbfoHs27H+amYZOn69U+yqEC5zO2ziIu/j5Ub5csMdPyzjIZ3vCeI4yxz510zS+p4VhE/XI5ffN8tVaDnAKWyKxOf9Wz89zig10mQcYdZLLztjZOJjyI+TaSITLwbZuVou0GIqWzgOBOT3t4oEVdXILN8lYHq9njHZSOD1q61LbWYcR66dt/dyKdfmxNNp2TKxOV1s7h7GQAY2Sni4cboZnvaxdveNE1SxKdql721DK2tijL6SZe97VO9Vtpulu+JePK4LCaR9Z4xmHEeN+4S8WCnQLUPiHiYuH/Fpc28mAFAWRQi4qsKL6mrlKG1FD35q/fwjrEbvn3fqzkBt/xcIr5BFOd4FiRZejYRT7UQEQeogJMiHj4tXDXU267+9OllxmcKhNwspzLkPIJuoyt8S5qv03O7/CDrN6dx0teMPXiZeP+xL3UR6kWeT3/LdAoiDlABWyIeZojrwNYzGNvbVWE6KZ7/V80ci3KGQbVKT52YD1rX7csrhuI5Zjgzo8pft/sPVC8/6TNFfJ5Z2le2eouwX6bF3SfIB5u3/nquCB0HKJEnXzH0WOXRUZy7W/X8UfsifjXHB4C/xe8X+/iIVPkWXbu7fAd/sQ8AwFGKWHYPAADnQMQBACoGEQcAqBhEHACgYhBxAICKQcQBACpmEfHY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1wbuU48/qkssuwcAqBhEHACgYhBxAICKQcQBACoGEQcAqBhEHKBwavETr6Xet4GfeCVEftnR2qzX+4knKSg+L/ATf4Sw3mJWp9UGfuJVYPhla99qZUIqfJBe4yeepqD4vMBP/BFi96sHzpN3gp94+Zh+2fr/lMHT6/3EoyoKis/dfuKm77bnrz1t78NbEq98rxxZdTh+pXREg930BzeP64Hz5LXgJ144rnmT9lZe7W761/uJK0qLz91+4mMdq2LOvtueq5/07k27ky9bvHLM8SsLaLshcFWM2+nVe/d58mbwEy+chF+2sgAaZPe810/cKL+s+NzvJ24bpCTE19zule/vb43f6A5eHZ9r5GJ+BggRPwt+4tVQhl/2UTL6iW9QRnye8BPPJOJm+UnRX7fP4zfpqev83Kz3ufPkfeAnXg3+mb2G871+4nsqKiI+N/uJz782xNf0105m1kb5vk+3/dOUjaEt4u7nhB46T94HfuJVYPhlx3e3L/YT36Ko+NzpJ77Hd3v111bVzT9dnnm6n/WJymmS49f6k9vOXf7jyMMh8BMHKI9cft+/Kr+0el8NfuIAABXDsnsAgIpBxAEAKgYRr5L/O/8BwF8DEa8SRBwARhDxKkHEAWCkCBEXb/n+uik/RTh7bOyJiAPASCDi85v+D77LObrmtE1zz0qtyXCxoFdTp0uW0aa2G/rPriXHiDgANE3TNP8BWwBnB0fjvqwAAAAASUVORK5CYII=" alt="" />
3、创建一个swap文件,并更改其权限
sudo fallocate -l 4G /swapfile
我们查看这个文件的权限
-rw-r--r-- 1 root root 4.0G Oct 30 11:00 /swapfile
会发现这个文件的可读权限是开发给任何人的,这样是非常不安全,因此我们要改变一下这个文件的权限
sudo chmod 600 /swapfile
-rw------- 1 root root 4.0G Oct 30 11:00 /swapfile
恩,这样就安全多了
4、使用这个swap文件
使用下面这个命令,告诉系统我们要把这个文件作为swap文件了
sudo mkswap /swapfile
Setting up swapspace version 1, size = 4194300 KiB
no label, UUID=b99230bb-21af-47bc-8c37-de41129c39bf
然后就是要使用这个swap文件了:
swapon -s
Filename Type Size Used Priority
/swapfile file 4194300 0 -1
然后我们再用free -m命令查看内存的使用情况:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqwAAABFCAIAAAAAdCMEAAAJ80lEQVR4nO3d7ZWkKhCAYeMxFSIhEAIhDoPb/eEHBVTR2qPdrbzPuefcHcaxFQERbGoYAAAAAAAAAAAALuLCNIv+24fyVaOPwQ0uRD9++1AAAP0ZfVzuxh+7DY0+rh/nwhTcybv38bOn89rS5VGOafQxuLkncGxf0zRN52cdAKAvo4/X3TDVu1v2idc8BF95Tm/S89mF6VAnYPSx87ETAMCJ6pvTPDQQ/bgOEqQ71JJQPYUq6aNIy/9gve/Xz8diksCH9Cu5K3kLtNLXToD4/fzhyv7nbeSvZW5Y5/uGOp/lM/2emRFre/N6Hc+3AyczTVOMYf645cgYmACAuzGfULc7hAtz654G8ecNxE1ITR+MkYC5E7BMBIiRAB/X28joo7gZywOcZxLa6UPWCch6MOr+swfx/His89LJTBvTp22fouZz9OOB0RBrJEC/Xofz7YAtc12Y/39oUgMA8BMaN6dyu7yNXzax0odhaHYClo/dts5vb+moqhGF5b5upS+fqz3+qvu3OgHN89K4MMnhByX/6r+fE0/pBCifdzzfjPMy9rP2ObYEOgEAcDPf6gSku9H26Cxvb2kvLuiPqlb6/LlTCCG7vZn7P6sT8EKVz/Xo/o697+8EvJVvB9AJAIAH2NsJKN+2S/cSKz37lUu3ZOtVRJksh+KXR+yKlZ525UI+PKDvvxh1UKch/n7vtEYCgtO7So29KOna9Xoj3w6gEwAAD/DyCTW17PlI8uv0bGf5Q/n6YzZzLvYTY3ZU+RC2+qJiSt++IijeAyxnFrL9p3T7hcQ/v/amdgLWmZFd+zbetLSv18F8O3Yy25865RVLAMA9XPoVwcaHtm9AVx/V58/a7gScND4PAMBRX1gsyCYe1S+5L169f4O9WBAAAAAAAAAAAAAAAAAAAAAAAACAXn3lC94AvkOss0y1b1sWMPr2YZxJrgnV4YpMn12K6v3y48KbFdS6vs3rvq7WeZ7HLPlVr4t6qP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lo0Y2yLiNGWw/Mh1gKFrqHfHdZXqn8bz325Gf90b5AXAubZRxnRsYh/rpf9s4hPQigI/Lj9qbgXQCFtugrswfPS61Hda8q3jeb7DjfN8e5QfAjyqmAwAAQBd4tgAAAAAAAAAAADjHP+M/AADwcHQCAADoFJ0AAMBDiG89f/tQvmpe/iVbANZAJwAAcLp1CaAPftc/LUZ0ycpuS2DDH1q6YIvFWB3T6GNwu5a4pRMAADjVfwjmEwTpYamPAAAAAElFTkSuQmCC" alt="" />
发现这个swap文件已经ok了!
5、使得这个新加入的swap文件永久生效,在系统启动的时候就生效,因此我们要在/ect/fstab文件里加入下面一行
先用vi打开文件,然后添加下面一行,然后保存。
sudo vi /etc/fstab
/swapfile swap swap sw 0 0
修改innodb_buffer_pool_size:
我的VPS上装的mariadb(15个mariadb的性能调优方法)。它有四个配置文件- - 分别都在/etc下面:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAAAxCAIAAADx6TNgAAAEKklEQVR4nO2dQZqbMAyFdR6OUh+iax9E657Bmy667JbDtQtjLIFkHAYCZN7/zSJjHCFkP1s4OCECAAAAAADg5gQeMyle7cqjGGLiQIFTHK52BbzCENPU39/WcENM5XSBRw4Hm4/pvZdzPNMgZFzDEBOHrLVNSsseE4shpkfH9GJODZ/ZH9QZzxmY79Yl+nShsNsl8Ngts5ad14HMvsQ6fHkQTHEow2Ft0zI+qkK7fBBl+g1FWesxW6SSkeshaUommV55kZk4nk9u2M915GEZDe963VCu/fHjIB0aU1y0w7pdauVX8m1THtWnlNJ+O3Z7uf3His+UekQRiKaW0ziOKXE2O52fQzWuu8x9bkncUXP2MnCOU031cgURKbOcnFE8y2xKF8VsFlNpkCEmEW/pYM432+WkZKbGCNO+mhy0P951mTT9MeOw6IEbMpvdeykDWNuRJYH3y9WLZ7G77j9eOy6k2BzR5kYt4avNp+OyI4M4kUZzLutpt6cqXjkRNWU2nXauPUQ5rFavVrOBHr3seWK+31xcp3nVtsya12Ww4c86DoGb/dtsl1z4RZnpebG3Ly7t+PHMZzD6jxOfhbA2UuL5vOW2XtavL++2SnSVzOQd+uyHZcXrjq1uGtPIzKoPufYPktmGP1+X2Tpn7OpGG/dUHbO0bcePp/FvKTItrw3vltl83ntNZdQvs2U4atS8cnVIZEhew8timbAFtruUV15NBdZTim1/MXOayeqmKrr8IeWSrq999WczDq/1ISvZ06ftM9a2oxJssvuPF58cdPHvVtLYkFl++92mMuoYNes16Hl/u1wZ0xOLmTAIOykpr3TCYS7JqCQki0XcoS/zT2W/lvtLL33ZleenHQddf2HflFnJt3t8Wbajjs9Ll+X4Y8fT7z9ueyVmuTjSUkia3xrUIpa+7ptNZXTRQm1tICcgZ3t1/+VpX2bb8+rb/Ok82ubgprjhVEaXfDztI4bHU3rS2fYPwv94+jq2PhjYGc8DW2TPwg4AAAAAAAAAAAAAAACATbD8CsDJLJ6IA+AjGa2/QJTK60g0iENt1vumpn1cbDxktG/fFADPIxH9JeKiop9Ev4i4HEqlWiRionZO5+2bktu9Np7vBuAjmbWUZTYImUlpSck5uI/Yedslp2OQGfh4GjKbj/ZMZZAZAC5tmWWB/TGmssCrpUFv3xRkBr47i8WP3+UF6wrGnl9rBX69b2re6lK+tqE+ct76DhoAvhUdd2UAgF380LMcb78DAAAAAAAAAAAAAAAAAACfy679ZtNXYJ7qGACfwv6Hra75MlAA9vCk/Wbqd8ogM/AcnrPfTD6ZjKQRPIrH7DfDo/3guTxmvxlkBp7LXfebre2rX+Dq/xFXAK7nrvvNLPtq7Z9xewY+B+w3A+AssN8MAAAAAACA78I/5w+8kf+mhRUbF9pc3wAAAABJRU5ErkJggg==" alt="" />
my.cnf.d是一个文件夹:(这里面有三个文件,忽视掉那个bakup文件,是我修改sever的备份)
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgUAAACJCAIAAAAzE9zQAAAS7ElEQVR4nO2d6bKcRhJG63n6NRx2eIxGGsuWdVdbI8uS0JXD4/Hu/zwIz3EfbuYHDdSSWQtNN9B9Tih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+QQSlfOSRWXH9IMOfjNYnkt9f+ipxP4oRaIIdj+5506axTsxek+g3dgWGdbJgedv73Z3roW5t+971tn2dA42XP/yytAsA66J0/QDOjwu9BK7Jdw1gjCnsR8MZc7lXwi16OAAAYNDLBIB1Ijycuqq59nPk7uHvpV0AAIAVcE88AAAAQzwAAICO+4/EAwAAYHwwB+gfZCDoFmivtWn1WfIaHPoH4VZWYsXcTGDBevKBoH+Qt0ugW+Dm/fdzKoT1qZSPgf6BOVv9gymsMD/E2rh7SDxviv5BFugf6Ii6Be6nIB1YUJ+J8hLoH2T64LEJ/QNjd/a3qzewNrLeP0D/IAn6BwqqboFlM8g8JtVnvLwE+gfD6eSH763oH5yJ3sDauHnfvZ+M/sFhkO9aPaZT+7YDTiaxjP5FrLx4YGv8aqUfRf8guXdws6xO/+Bc8kuvjau3v6YLoX+QhHiQJDZxkZ4vSpQXSsjNDvoHRWbWqn9APDgOL77/OV0I/YMk6B8k0RtHodsarc+Mbi76B8P8zBnoH5yv3sDaeP7qx+j36B8UOoT+QfTwzpyyZF2tz/xHBdE/ODf9g/PVG1gbz+4ImAAO6B/AhfLk6s3SLgCsgsvNeg/Q8fnX3y3tAgAArIBP/3W3tAsAALACPnl6vbQLcL78T/kHACvkk39eLe0CnC/EA4AN8clT4gEcDeIBwIb49Nnt0i44D4gv7Qpk0L3zk/MKHvEAYEN8/tW39sf+hY4TPn49vteW9z5nIXV72tNZB5PyvFeNE5KHrLVB3e3qtqmy8mYSDwA2xJOXzvsHR30TR2xAvDyIxzj6xb1dNP29fD/Ng3w9VM0j8QDg/PDeTw7v/2Pnze9DQNgbVfLRK/nT1e19PNj5aQEE+9H8+Or5+nRW2nb/kv3+OE01OumeSn5qtmPkeXfqJR0PyuwTDwC2w/8B6CRp8m5YN0sAAAAASUVORK5CYII=" alt="" />
然后去/usr/share/mysql里面,会有一些example的配置文件,copy一份过来,我的VPS的配置,我选择了medium那个文件
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAP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eAAAAAAAAAADgjai67T4L/MFQ8tElY264FPxtDPRDByqCrvmJZV1nVsvgyjoZd6duNBzjej90y08cukjqnG3YRN1oOMH1fui2n7hmeKBuNJzicj90z0/8UNDUjYaDXO2H7vuJa5GpGw2/52o/tDT9xOX+qQ/qRsOFvNTX+9E3AeG9eKGvl7rRAAAAAAAAAAAALycrvhib3ucOND5pOMoxq8aTYUn8Yxjjhw6bq3FEmj7mRr3nXp3pWSR5TqcH/TbAJ31rRvmh23EaPuZmvee4566ij53x18AnfXdG+aFbcVo+5nZ5XNWwT9Bdt2ABttK7M8oP3YzTSI4RNFzCKD90O07jfkWz3rOKVwpapxl7BI1P+usY44fWVZdrceo+5lq9595PvFL2sv54NtaF3vQbjsAnDRuocwz3gDrHAAAAAAAAAAAAsNCqM/2E+tP4nuEqWiVmLi09wxL3xzO2PnRRw+uBX7lRNzpwXtD4nr+ScfWhtdSS2agXv103+rSg8T1/KyPrQ9cWyzvxO3WjTwsam+i3Mro+dDwwzdAtn3SnbjSChl8yrj50prTodu78kqVTN/qgoPE9w8K4+tA103PXJ72zbnT+09hqqoPvGfaDHxruAX5oAAAAAAAAAACAF1GsV2xKgG42ZR65FKc8oCwUmnXnTDv+y8BvfQP+BwRDYt/bXQv6AAAAAElFTkSuQmCC" alt="" />
然后重启mariadb
systemctl restart mariadb
我们查看一下innodb_buffer_pool_size有没有被修改
查看方法:进到mysql里面,然后select下面那个变量。
mysql -uroot -p
mysql> SELECT @@innodb_buffer_pool_size/1024/1024/1024;
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAX0AAABqCAIAAADfvxaRAAAHvElEQVR4nO3dPXrjKhSAYa1HS7EWcWvqKe7dAHWKKZJyaPI8mSJFmim0uVvoh8PPQZCxZdn63io5xgjJ5ghky3QdAAAAAAAAAAAAAAAAAAAAAADA0xmsM/29GwHgrvbOA+QdAOQdAHvbKQ/0xo0xO3RdN9hsmDhx4s8XV/PArTHeAcA8C8DeyDsA9kYeAAAAAAAAAA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P9+quvY18k7Q4OVaSam/XSnviPFP1TwrX761nrjSjf0l7+AI/jLvxJ/piLf1xdq3j69fL86+uN9fXx9V3efv807QHtGJC1MI/xQ5CdmQXITtjf33P7vMd8LH1iFJRflSPVfY3zAe7TDzLNzYJfnVw8JF32xxf05W49OVn5p3c6b+cbT/iLrtD1+kUFcywfDdVn0o2HjtyT4dGgT1B9Xk8o5eXq/nOvsbxf0TuK4MHN3Tfez8dDsEPKPoe4OPjcEOAAAAAAAAAAAAgHP7HxMXcQsVH5lOAAAAAElFTkSuQmCC" alt="" />
恩,发现已经被我们改成50M了!
解决:wordpress error establishing a database connection problem的更多相关文章
- wordpress Error establishing a database connection问题
最近这场大雨,快把帝都给淹了,我也快被这不定向问题折磨疯了,本来把项目放在A服务器,nginx ,php7,mysql,然后换到了B服务器,环境一模一样,结果呢,传上去就出现了 哎,话说我的配置也没啥 ...
- Error establishing a database connection!
后来发现在 wp-config.php 有个 debug 的参数,打开这个参数,修改为: define('WP_DEBUG','true'); 修改这个后,非常不错,报了很多错,一堆.... 使用 ...
- 解决Kloxo出现Could not open database connection问题
当我们在使用或者运行kloxo面板的时候,可能会出现类似"Could not open database connection"错误提示,对于新手朋友来说肯定本身安装面板管理VPS ...
- Error: Failed to fetch plugin E:_My_File______workMyCodemyCodecordova-workspaceplugman-testMyMath via registry. Probably this is either a connection problem, or plugin spec is incorrect.
$ cordova plugin add E:\_My_File_____\_work\MyCode\myCode\cordova-workspace\plugman-test\MyMath --sa ...
- java操作数据库出现(][SQLServer 2000 Driver for JDBC]Error establishing socket.)的问题所在即解决办法
在进行jdbc直接操作数据库时 : 我们需要对该工程进行一次导包(引入"msbase.jar" "mssqlserver.jar" "msuti ...
- Error establishing socket解决办法
jdbc配置语句为: jdbc:microsoft:sqlserver://server_name:1433 如运行程序时出现 "Error establishing socket" ...
- dpkg: error: dpkg status database is locked by another process 解决方法
使用dpkg -i/apt命令安装,报错: ------------------------------------------------------------- dpkg: error: dpk ...
- [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket错误解决方法总结
今天做一个特殊的业务处理,用JDBC连接SQLServer数据库载入驱动的时候,报例如以下错误: java.sql.SQLException: [Microsoft][SQLServer 2000 D ...
- Laradock Laravel database connection refused
Laradock Laravel database connection refused SHARE Laradock is a PHP development environment which ...
随机推荐
- 集成 ssh第一阶段
1.添加spring支持,包含spring-hibernate和spring-struts2.添加struts支持,包含struts-spring3.添加hibernate支持,在spring配置文件 ...
- English - 被动语态的翻译原则
被动语态翻译原则 1. Passive ----> Active The bag is stolen by him. One the whole, such a conclusion can b ...
- JSP include HTML出现乱码 问题解决
Problem? 当使用<jsp:include page="top.html"></jsp:include>引入html文件时, 并且jsp 和 html ...
- 使用three.js加载3dmax资源,以及实现场景中的阴影效果
使用three.js可以方便的让我们在网页中做出各种不同的3D效果.如果希望2D绘图内容,建议使用canvas来进行.但很多小伙伴不清楚到底如何为我们绘制和导入的图形添加阴影效果,更是不清楚到底如何导 ...
- MD5加盐 Java加密算法
MD5带盐值的java加密算法 import java.security.MessageDigest; public class PasswordEncoder { private final s ...
- django Modelform
前言: 为什么要用form去验证呢? 我们提交的是form表单,在看前端源码时如果检查到POST URL及我们提交的字段,如果没有验证我们是否可以直接POST数据到URL,后台并没有进行校验,直接处理 ...
- data-packed volume container - 每天5分钟玩转 Docker 容器技术(43)
在上一节的例子中 volume container 的数据归根到底还是在 host 里,有没有办法将数据完全放到 volume container 中,同时又能与其他容器共享呢? 当然可以,通常我们称 ...
- QTCreator 更改代码高亮主题为 VS+VA助手 风格
VS Dark-VA 主题下载地址 链接:http://pan.baidu.com/s/1jIOeZxc 密码:2gp2 另外还有喜欢 solarized 配色的也可以从这里下载 https ...
- 51nod_1661: 黑板上的游戏(sg函数 找规律)
题目链接 先打一个sg函数的表,找找规律,发现sg函数可以递归求解 打表代码如下 #include<bits/stdc++.h> using namespace std; typedef ...
- Laravel 中使用子域名(一个框架多项目)
1.本地虚拟域名为:www.test.com,子域名为admin.test.com 2.apache环境中,配置apache的httpd-vhost.conf文件 <VirtualHost *: ...