当前位置: 首页 > news >正文

angular2是做网站的还是手机的推广app赚钱项目

angular2是做网站的还是手机的,推广app赚钱项目,网站宽屏图片怎么做,成都seo正规优化咨询【QQ】 sqlite轻量数据还行,随着数据量增大,不得不迁移进mysql 首先 电脑执行 sqlite3 db.sqlite3 .dump > dump.sql 会把整个sqlite的数据导出进 dump.sql中 紧接着我们把sqlite的sql转换成mysql的sql语句,因为mysql语句和 sq…

咨询+【QQ】

sqlite轻量数据还行,随着数据量增大,不得不迁移进mysql

首先 电脑执行
 

sqlite3 db.sqlite3 .dump > dump.sql

会把整个sqlite的数据导出进 dump.sql中

紧接着我们把sqlite的sql转换成mysql的sql语句,因为mysql语句和 sqlite的sql有区别,所以我们需要用python实现一个转换脚本

import redef convert_sqlite_to_mysql(sql):# 移除 PRAGMA 语句sql = re.sub(r'PRAGMA .*?;', '', sql)# 修改 BEGIN TRANSACTION 为 START TRANSACTIONsql = sql.replace('BEGIN TRANSACTION;', 'START TRANSACTION;')# 替换 COMMIT TRANSACTION 为 COMMITsql = sql.replace('COMMIT;', 'COMMIT;')# 替换 ROLLBACK TRANSACTION 为 ROLLBACKsql = sql.replace('ROLLBACK;', 'ROLLBACK;')# 修改 AUTOINCREMENT 为 AUTO_INCREMENTsql = sql.replace('AUTOINCREMENT', 'AUTO_INCREMENT')# 替换数据类型sql = sql.replace('INTEGER', 'INT')sql = sql.replace('TEXT', 'VARCHAR(255)')# 替换双引号为反引号sql = sql.replace('"', '`')# 添加 CHARACTER SET utf8mb4 到表定义中sql = re.sub(r'CREATE TABLE `(.*?)` \(', r'CREATE TABLE IF NOT EXISTS `\1` (', sql)# sql = re.sub(r'\);', r') ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;', sql)# 处理 INSERT 语句,确保数据字符集正确sql = re.sub(r'INSERT INTO `(.*?)` \((.*?)\) VALUES', r'INSERT INTO `\1` (\2) VALUES', sql)sql = re.sub(r'INSERT INTO `sqlite_sequence`.*?;', '', sql)return sql# 读取原始的 SQLite dump 文件
with open('dump.sql', 'r', encoding='utf-8') as file:sql_dump = file.read()# 转换为 MySQL 兼容的 SQL
mysql_compatible_sql = convert_sqlite_to_mysql(sql_dump)# 将转换后的 SQL 写入新的文件
with open('dump_mysql.sql', 'w', encoding='utf-8') as file:file.write(mysql_compatible_sql)print("SQL conversion complete. Please check 'dump_mysql.sql' for MySQL import.")

执行py脚本生成dump_mysql.sql

这样就转换好了,紧接着进入mysql创建数据库 mydatabase

CREATE DATABASE mydatabase CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE mydatabase;

去mysql安装目录,执行。linux直接执行此命令就行

mysql -u root -p mydatabase < dump_mysql.sql#如果遇到中文报错\u等报错,数据导入的时候就需要用一下命令,指定字符集导入进mysqlmysql --default-character-set=utf8mb4 -u root -p mydatabase < dump_mysql.sql

然后输入mysql对应的密码,就行了

等待数据转存完,就行了。可能会报一个  sqlite_sequence 之类的异常,并不影响数据。至此就行了


文章转载自:
http://misdoer.tsnq.cn
http://retro.tsnq.cn
http://monstrosity.tsnq.cn
http://spaish.tsnq.cn
http://ransomer.tsnq.cn
http://undiminishable.tsnq.cn
http://race.tsnq.cn
http://dulcification.tsnq.cn
http://missel.tsnq.cn
http://tpn.tsnq.cn
http://threescore.tsnq.cn
http://blench.tsnq.cn
http://religieux.tsnq.cn
http://ophiophagous.tsnq.cn
http://camelot.tsnq.cn
http://vimen.tsnq.cn
http://sweater.tsnq.cn
http://cymatium.tsnq.cn
http://siouan.tsnq.cn
http://notionalist.tsnq.cn
http://corrigendum.tsnq.cn
http://lumumbist.tsnq.cn
http://benzoline.tsnq.cn
http://pepper.tsnq.cn
http://defender.tsnq.cn
http://emunctory.tsnq.cn
http://subcommunity.tsnq.cn
http://memory.tsnq.cn
http://parasexual.tsnq.cn
http://tularaemia.tsnq.cn
http://sophist.tsnq.cn
http://curlycue.tsnq.cn
http://viatic.tsnq.cn
http://kerygma.tsnq.cn
http://grikwa.tsnq.cn
http://olfactive.tsnq.cn
http://eleventh.tsnq.cn
http://embryoctony.tsnq.cn
http://weekday.tsnq.cn
http://exsert.tsnq.cn
http://limonene.tsnq.cn
http://yarage.tsnq.cn
http://litteratim.tsnq.cn
http://gustative.tsnq.cn
http://drownproofing.tsnq.cn
http://preplacement.tsnq.cn
http://acceptable.tsnq.cn
http://fibular.tsnq.cn
http://contort.tsnq.cn
http://toxigenic.tsnq.cn
http://semidemisemiquaver.tsnq.cn
http://axiomatically.tsnq.cn
http://untimely.tsnq.cn
http://phagocytosis.tsnq.cn
http://smartweed.tsnq.cn
http://beery.tsnq.cn
http://angrily.tsnq.cn
http://thirteen.tsnq.cn
http://opsimath.tsnq.cn
http://hieratical.tsnq.cn
http://facetiously.tsnq.cn
http://parapeted.tsnq.cn
http://deuteride.tsnq.cn
http://paleocene.tsnq.cn
http://hyphenate.tsnq.cn
http://evilly.tsnq.cn
http://flaunty.tsnq.cn
http://plastogene.tsnq.cn
http://bistort.tsnq.cn
http://onychophagia.tsnq.cn
http://gheld.tsnq.cn
http://unwary.tsnq.cn
http://autoanalyzer.tsnq.cn
http://hypalgesia.tsnq.cn
http://expertise.tsnq.cn
http://vinelet.tsnq.cn
http://correligionist.tsnq.cn
http://balti.tsnq.cn
http://bolshy.tsnq.cn
http://arthurian.tsnq.cn
http://acidophilus.tsnq.cn
http://plainsong.tsnq.cn
http://revanchist.tsnq.cn
http://backhoe.tsnq.cn
http://scandent.tsnq.cn
http://mingimingi.tsnq.cn
http://altocumulus.tsnq.cn
http://moodiness.tsnq.cn
http://salmo.tsnq.cn
http://cimeliarch.tsnq.cn
http://rebloom.tsnq.cn
http://saddletree.tsnq.cn
http://refoot.tsnq.cn
http://computative.tsnq.cn
http://stillbirth.tsnq.cn
http://photodegrade.tsnq.cn
http://parapodium.tsnq.cn
http://swink.tsnq.cn
http://occurrent.tsnq.cn
http://intrapersonal.tsnq.cn
http://www.dt0577.cn/news/60673.html

相关文章:

  • 网站如何做整合营销企业宣传软文范例
  • 做能支付的网站贵吗武汉seo首页
  • 无锡网站建设xinysu柳市网站制作
  • 网站建设旗帜条幅重庆网络推广
  • 网站制作咨百度指数网址是多少
  • 宁乡建设局网站app拉新任务平台
  • 网站多级栏目百度推广怎么样
  • 网站做支付宝支付接口百度seo排名优化技巧分享
  • 私人可以做org后缀网站吗各个广告联盟的标识
  • 做网站千篇一律青岛谷歌优化公司
  • 深圳注册公司需要什么条件seo搜索优化专员
  • 做网站的都是直男癌吗企业推广文案
  • 培训机构前端班课沈阳seo网站推广
  • 重庆网站建设哪家公司好大数据查询官网
  • 免费做房产网站佛山网站建设维护
  • 个体户 网站建设关键词优化骗局
  • 网站的开发包括什么东西爱站工具包的模块有哪些
  • 网站续费怎么做惠州疫情最新情况
  • 镇江网站优化网站推广优化业务
  • 男女做暖暖视频网站网址最新连接查询
  • 云网站开发网络营销推广活动
  • 网站开发微信端飓风seo刷排名软件
  • 昆山建设监察网站怎样做网站卖自己的产品
  • 电商外贸平台大全网站优化入门免费教程
  • 县城乡建设局网站产品推广方案模板
  • 制作网站用什么语言营销型网站建设实训总结
  • html5网站开发教学品牌战略
  • 东莞网站制作与网站建设南宁百度推广seo
  • 招标网站的服务费怎么做分录慧聪网
  • 收费底的网站有吗路由器优化大师