个别模块或多或少有需要对比数据库结构的时候。一般存在于安装模块缺少字段等问题。比较常见的如【禾匠小程序商城,如升级的时候都需要对比数据库结构】,【人人商城首次安装,对比下数据库结构,因人人数据库表较多,对比下结构,后续不容易出现问题】
常用于各类模块升级,或者安装缺数据库表、字段的情况下。一样的模块一样的程序到了不同站点,个别用户可能就会出现安装后少数据库表的情况,通常遇到此问题就可以尝试对比下数据库结构来解决
本文以【禾匠小程序商城】为列(禾匠这个模块升级基本都是需要对比数据库结构的)
1.正在运营的站点,已上线的项目请一定备份下,文件备份和数据库都需要备份
2.将禾匠的后端文件zjhj_mall打包上传到微擎站点的addons文件夹,解压覆盖
3.微擎后台–更新系统缓存–小程序应用–已安装应用–升级(禾匠)
如果框架是2.0版的,应用管理–已安装应用–升级
对比数据库结构一般需要对比数据库结构的模块,本站都会在里面有一个数据库结构对比源的sql数据库文件,如这类标志的,通常是后端有些莫名BUG,可用下图的数据库结构进行对比,可大大减少BUG的可能。
接下来我们用数据库软件【自行百度下载】Navicat premium,下载后安装在自己的电脑上面
我们去宝塔控制面板新建一个数据库,将数据库结构对比源也就是上图说的那个升级用的数据库文件导入进去
(不是用宝塔控制面板的也可以本地电脑搭建个phpStudy环境,创建数据库导入数据库结构对比源)
接下来我们打开navicat数据库软件,
连接数据库【微擎站点的数据库以及新建的数据库(导入了数据库结构对比源的)】
连接之前我们需要将服务器的3306端口打开,使用宝塔控制面板的同学,服务器开了3306端口,宝塔控制面板也要开放下3306端口,并将数据库权限改为所有人,否则等下是连接不上的。
连接这两个数据库
如下图,输入数据库信息
点击连接测试–提示–连接成功–点击确定,把两个数据库都连接下
点击工具–结构同步
源:对应的是我们导入了数据库结构对比源的数据库
目标:对应的是我们微擎站点的数据库
大家一定要注意,默认是勾选上了【删除对象的SQL】这里我们要去掉勾选,如下图,去掉勾选后,点击比对
点击后进入如下界面,我们需要漫长的等待,根据自己服务器配置有关系,电脑配置有关系
一般的话大概需要10-30分钟不定,甚至更长,这个要看你微擎数据库表多不多。我们一定要等
我们继续等,等到如下图100%完成
选中一个数据库,然后右键,全部选择
必须点击“运行查询”,如果你点了数据同步,那么数据全部丢失!!!!!
结构同步完后,如下图
数据库结构对比完成,关闭Navicat,将数据库权限改为本地服务器,3306端口删除
然后进微擎后台,更新缓存,检查升级有没有哪里出错或不正常的,如有发现,恢复备份数据
【此方法适应于各类数据库结构对比教程】
建议大家先用测试站多熟悉熟悉,再用于正式站点操作,操作之前一定要做好备份,再次劝告大家,框架升级、模块升级之前请务必做好备份,不要节省备份的这一点时间,数据无价,万一出错了,后悔来不及。
升级完后及时检查各方面数据。
以上方法适合动手能力强的同学
还有一种方法简单宝塔面板搜索插件数据结构比对工具付点毛爷爷每月省时省力
波比源码 » 教程素材 微擎通用各类数据库结构对比教程 正在运营的站点,已上线的项目请一定备份下,文件备份和数据库都需要备份
order levaquin pill order levofloxacin online cheap
buy avodart generic order ondansetron online cheap cost ondansetron 4mg
spironolactone 100mg drug propecia 5mg pill diflucan 100mg sale
ampicillin 250mg brand bactrim 480mg us buy erythromycin online cheap
sildenafil 50mg drug nolvadex 10mg price order robaxin 500mg
suhagra 100mg canada sildenafil 25mg buy estrace 1mg pill
buy lamictal 200mg order prazosin 1mg retin price
order accutane 40mg for sale accutane pill buy zithromax 250mg online
buy indomethacin online order suprax 200mg pills buy trimox 500mg online
anastrozole over the counter Canada meds viagra purchase viagra
vrai cialis 20mg prix pharmacie en ligne cialis 40mg sildenafil 200mg generique pas cher
purchase accutane pill buy azithromycin 250mg without prescription ivermectin 3 mg stromectol
order ramipril 5mg generic buy azelastine generic buy astelin sprayer
order clonidine without prescription order clonidine 0.1mg pill oral spiriva 9mcg
buy hytrin 5mg pill buy arava 20mg sale buy generic azulfidine 500 mg
fosamax 35mg generic buy famotidine sale famotidine 20mg pill
buy sertraline 50mg online buy escitalopram 10mg for sale sildenafil over the counter
order imuran generic sildenafil dosage viagra online buy
tadalafil india amantadine 100mg sale order amantadine pills
order avlosulfon 100 mg pill cheap allegra 120mg aceon medication
cost medroxyprogesterone 10mg purchase biltricide without prescription purchase cyproheptadine without prescription
buy modafinil 100mg online best canadian online pharmacy ivermectin over the counter uk
fluvoxamine us fluvoxamine 50mg cheap buy glipizide online
brand accutane 40mg amoxicillin brand deltasone 5mg us
brand piracetam sildenafil viagra sildenafil 50mg pill
tadalafil 20mg cost betamethasone online order clomipramine order online
itraconazole 100 mg generic tindamax oral tinidazole online order
order glucophage 1000mg buy glycomet online cheap order cialis 10mg generic
buy olanzapine 10mg generic cheap nebivolol 5mg brand diovan 160mg
norvasc price us pharmacy viagra order generic tadalafil
cheap clozaril ipratropium ca dexamethasone pills
buy sildenafil pills buy viagra for sale generic lisinopril 10mg
omeprazole 20mg us omeprazole usa real casino online
order clomid without prescription order ventolin inhalator online online casino usa
cheap cialis generic cialis tadalafil 40mg sildenafil 100 mg
triamcinolone 10mg uk buy loratadine without prescription order clarinex online cheap
buy priligy online brand misoprostol 200mcg synthroid 75mcg generic
tadalafil 5 mg tablet cialis viagra sales viagra for women
motilium 10mg brand buy generic tetracycline 250mg order generic cyclobenzaprine 15mg
order losartan online topiramate ca order topiramate 100mg pill
imitrex 25mg for sale buy levofloxacin 250mg sale buy avodart for sale
buy colchicine pill real money games no deposit bonus codes
buy zantac order celecoxib 100mg online cheap celebrex price
buy cialis 5mg online cheap cost tadalafil 10mg ciprofloxacin pill
order zocor 20mg simvastatin order online buy propecia 5mg generic
order tadalafil 10mg online tadalafil without a doctor’s prescription viagra sildenafil 200mg
buy cefuroxime sale order cefuroxime sale order robaxin online
blackjack vegas free online games cost tadalafil buy tadalafil 10mg for sale
buy trazodone 50mg online cheap buy suhagra 100mg brand aurogra 100mg
online blackjack live dealer blackjack online tadalafil 10mg without prescription
azithromycin 250mg canada cheap generic prednisolone buy gabapentin generic
buy sildenafil generic sildenafil order online rhinocort us
retin ca oral tadalafil 10mg buy generic avana 100mg
buy tiotropium bromide without prescription cost tiotropium bromide 9mcg buy terazosin pill
play blackjack online casinos for usa players play casino online
that roulette world series of poker online write essay service
oral doxycycline 100mg doxycycline 200mg brand purchase cleocin
order mesalamine 800mg generic generic irbesartan buy avapro 300mg online
diamox 250 mg pill purchase acetazolamide for sale buy imuran online cheap
clobetasol online order amiodarone price order amiodarone 200mg generic
lanoxin sale molnupiravir for sale online generic molnunat
purchase coreg pills amitriptyline 50mg pills amitriptyline 50mg uk
fosamax 70mg oral order nitrofurantoin ibuprofen 600mg cost
order indomethacin for sale buy indomethacin sale order cenforce 100mg for sale
oral requip 2mg oral ropinirole 2mg labetalol 100 mg brand
fenofibrate 160mg pills buy sildenafil 100mg sale order generic sildenafil 50mg
purchase minocin pills terazosin tablet terazosin generic
order tadalafil 10mg online cheap buy erectile dysfunction drugs over the counter ed pills that work
brand glycomet 1000mg order generic metformin 500mg nolvadex usa
order provigil 200mg for sale provigil 200mg ca purchase phenergan sale
oral deltasone 40mg buy deltasone 5mg amoxil uk
order fildena 50mg generic buy lyrica generic order generic finasteride
stromectol price order generic stromectol prednisone 20mg for sale
purchase ventolin inhalator for sale synthroid 100mcg pills augmentin 1000mg pill