2021-08-07-DJ-036 在阿里云服务器上迁移我们的数据库,以后省一台电脑的电费了
2021/8/7 19:08:08
本文主要是介绍2021-08-07-DJ-036 在阿里云服务器上迁移我们的数据库,以后省一台电脑的电费了,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
这篇我们讲怎么把我的数据库迁移到服务器上
阿里云上的docker服务器配置
这节用的导入导出的数据文件amo.sql
一、Windows里面MySQL workbench的方法
借鉴方法来源于利用 mysql workbench 将数据库导出成 migration 文件,工具直接在他那里下载
安装好之后重启workbench
1.导出
根据下图顺序点击
这个选项的里面一定要填个文件夹,这个方式是一堆文件
这个选项的是一整个文件
2.导入
然后MySQLWorkbench里面打开我们的阿里云实例
同样类似顺序点击
第二步按照自己导出的类型选,导出的都是一些表,所以加进去的时候要设置数据库名称。
远程的数据库导入比较慢,所以这里要等一会儿
3.去 远程看看数据进来了没有
mysql> show databases -> ; +--------------------+ | Database | +--------------------+ | aliyun | | amo | | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 6 rows in set (0.00 sec) mysql> use amo Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> show tables; +-------------------------------------+ | Tables_in_amo | +-------------------------------------+ | auth_group | | auth_group_permissions | | auth_permission | | auth_user | | auth_user_groups | | auth_user_user_permissions | | celery_taskmeta | | celery_tasksetmeta | | django_admin_log | | django_celery_beat_clockedschedule | | django_celery_beat_crontabschedule | | django_celery_beat_intervalschedule | | django_celery_beat_periodictask | | django_celery_beat_periodictasks | | django_celery_beat_solarschedule | | django_celery_results_chordcounter | | django_celery_results_taskresult | | django_content_type | | django_migrations | | django_session | | djcelery_crontabschedule | | djcelery_intervalschedule | | djcelery_periodictask | | djcelery_periodictasks | | djcelery_taskstate | | djcelery_workerstate | | t_goods | | t_gooods_label | | t_label | | t_order | | t_order_goods | | t_store | | t_store_goods | | t_user | | t_user_login | +-------------------------------------+ 35 rows in set (0.00 sec) mysql> select * from t_user -> ; +-----+----------------------+-----+-------------+----------------------------+--------+----------------------------------+ | id | name | age | number | img1 | status | userlogin_id | +-----+----------------------+-----+-------------+----------------------------+--------+----------------------------------+ | 1 | amor | 12 | 133432323 | mainapp/user/test/amor.jpg | 0 | f8925175ceb343f3b0865f34421d079e | | 3 | bao | 45 | 14444444444 | mainapp/user/1.jpg | 0 | ad9ba187be8347b08e55ce3fb16fce69 | | 4 | kaj | 13 | 15555555555 | mainapp/user/1.jpg | 0 | NULL | | 5 | ?? | 11 | 12222222222 | mainapp/user/1.jpg | 0 | NULL | | 6 | jiji | 88 | 23123333333 | mainapp/user/1.jpg | 0 | NULL | | 7 | paopao | 77 | 19999999999 | mainapp/user/1.jpg | 0 | NULL | | 8 | ?? | 16 | 16666666666 | mainapp/user/1.jpg | 0 | NULL | | 9 | kaer | 0 | 18888888888 | mainapp/user/1.jpg | 0 | NULL | | 10 | ??? | 0 | NULL | mainapp/user/1.jpg | 0 | NULL | | 11 | wuyiqian | 11 | 22222222222 | mainapp/user/1.jpg | 0 | NULL | | 12 | jjj | 11 | 1231321312 | mainapp/user/1.jpg | 0 | NULL | | 13 | jj1 | 19 | 123132312 | mainapp/user/1.jpg | 0 | NULL | | 14 | qqq | 11 | NULL | mainapp/user/1.jpg | 0 | NULL | | 15 | Wziev | 92 | 16270528173 | mainapp/user/1.jpg | 0 | NULL | | 16 | Qkvof | 87 | 18578757379 | mainapp/user/1.jpg | 0 | NULL | | 17 | Pinii | 26 | 16984294383 | mainapp/user/1.jpg | 0 | NULL | | 18 | Nyhox | 39 | 15332121797 | mainapp/user/1.jpg | 0 | NULL | | 19 | Vjsei | 98 | 17923569644 | mainapp/user/1.jpg | 0 | NULL | | 20 | Hvbry | 22 | 17256035934 | mainapp/user/1.jpg | 0 | NULL | | 21 | Rkzrm | 83 | 19436531157 | mainapp/user/1.jpg | 0 | NULL | | 22 | Fpvth | 62 | 18430938081 | mainapp/user/1.jpg | 0 | NULL | | 23 | Cdsvj | 19 | 16763016229 | mainapp/user/1.jpg | 0 | NULL | | 24 | Memru | 69 | 10958016272 | mainapp/user/1.jpg | 0 | NULL | | 25 | Swyds | 33 | 10789468051 | mainapp/user/1.jpg | 0 | NULL | | 26 | Zhcye | 68 | 17403871125 | mainapp/user/1.jpg | 0 | NULL | | 27 | Wiqxl | 53 | 10342515077 | mainapp/user/1.jpg | 0 | NULL | | 28 | Ihqxt | 73 | 11176241997 | mainapp/user/1.jpg | 0 | NULL | | 29 | Yvxry | 25 | 19495526358 | mainapp/user/1.jpg | 0 | NULL | | 30 | Dilei | 41 | 15839118661 | mainapp/user/1.jpg | 0 | NULL | | 31 | Ihgfk | 69 | 14410709517 | mainapp/user/1.jpg | 0 | NULL | | 32 | Rrycq | 77 | 16171578333 | mainapp/user/1.jpg | 0 | NULL | | 33 | Bwzmh | 58 | 11554626106 | mainapp/user/1.jpg | 0 | NULL | | 34 | Dmigp | 97 | 12378347784 | mainapp/user/1.jpg | 0 | NULL | | 35 | Xjqii | 53 | 16325063445 | mainapp/user/1.jpg | 0 | NULL | | 36 | Itano | 5 | 13753607530 | mainapp/user/1.jpg | 0 | NULL | | 37 | Tispo | 92 | 12729162289 | mainapp/user/1.jpg | 0 | NULL | | 38 | Qybya | 93 | 16194831575 | mainapp/user/1.jpg | 0 | NULL | | 39 | Sldfo | 8 | 13446186055 | mainapp/user/1.jpg | 0 | NULL | | 40 | Arhyt | 31 | 13994465270 | mainapp/user/1.jpg | 0 | NULL | | 41 | Fvmph | 58 | 18806092842 | mainapp/user/1.jpg | 0 | NULL | | 42 | Ltvml | 60 | 15226870749 | mainapp/user/1.jpg | 0 | NULL | | 43 | Qchdo | 25 | 19710573273 | mainapp/user/1.jpg | 0 | NULL | | 44 | Ouehc | 28 | 15374339282 | mainapp/user/1.jpg | 0 | NULL | | 45 | Fdbqk | 62 | 10666418507 | mainapp/user/1.jpg | 0 | NULL | | 46 | Ecwgy | 72 | 14894225756 | mainapp/user/1.jpg | 0 | NULL | | 47 | Mtuze | 87 | 16809116395 | mainapp/user/1.jpg | 0 | NULL | | 48 | Gpvbd | 26 | 13655211159 | mainapp/user/1.jpg | 0 | NULL | | 49 | Conof | 75 | 10486682226 | mainapp/user/1.jpg | 0 | NULL | | 50 | Uwrgt | 12 | 17024563644 | mainapp/user/1.jpg | 0 | NULL | | 51 | Bfmfs | 72 | 14338517174 | mainapp/user/1.jpg | 0 | NULL | | 52 | Anhhz | 44 | 10274584013 | mainapp/user/1.jpg | 0 | NULL | | 53 | Pfpba | 73 | 19877860664 | mainapp/user/1.jpg | 0 | NULL | | 54 | Yyczj | 80 | 18251966346 | mainapp/user/1.jpg | 0 | NULL | | 55 | Plxaq | 44 | 13524811653 | mainapp/user/1.jpg | 0 | NULL | | 56 | Szxrd | 84 | 12780076564 | mainapp/user/1.jpg | 0 | NULL | | 57 | Bqlkf | 81 | 12234933550 | mainapp/user/1.jpg | 0 | NULL | | 58 | Kutdr | 77 | 16073853645 | mainapp/user/1.jpg | 0 | NULL | | 59 | Qszxk | 91 | 13380312415 | mainapp/user/1.jpg | 0 | NULL | | 60 | Mknys | 65 | 12142946689 | mainapp/user/1.jpg | 0 | NULL | | 61 | Shhki | 32 | 18215451412 | mainapp/user/1.jpg | 0 | NULL | | 62 | Itzow | 30 | 16518141369 | mainapp/user/1.jpg | 0 | NULL | | 63 | Mtrqi | 14 | 18355398835 | mainapp/user/1.jpg | 0 | NULL | | 64 | Ploqi | 38 | 12221285533 | mainapp/user/1.jpg | 0 | NULL | | 65 | Byhte | 14 | 17545298438 | mainapp/user/1.jpg | 0 | NULL | | 66 | Hmzxl | 58 | 13583788194 | mainapp/user/1.jpg | 0 | NULL | | 67 | Hgbza | 94 | 16960326981 | mainapp/user/1.jpg | 0 | NULL | | 68 | Hlmsv | 23 | 12938220134 | mainapp/user/1.jpg | 0 | NULL | | 69 | Nczes | 92 | 11051848377 | mainapp/user/1.jpg | 0 | NULL | | 70 | Bmvsm | 21 | 12642952146 | mainapp/user/1.jpg | 0 | NULL | | 71 | Joadw | 17 | 12847786832 | mainapp/user/1.jpg | 0 | NULL | | 72 | Enrhp | 31 | 16291849008 | mainapp/user/1.jpg | 0 | NULL | | 73 | Lhkog | 74 | 13951857654 | mainapp/user/1.jpg | 0 | NULL | | 74 | Aufkd | 83 | 16863691171 | mainapp/user/1.jpg | 0 | NULL | | 75 | Tcdfy | 61 | 13280983780 | mainapp/user/1.jpg | 0 | NULL | | 76 | Lptgv | 67 | 11496431723 | mainapp/user/1.jpg | 0 | NULL | | 77 | Aeixj | 5 | 13863929668 | mainapp/user/1.jpg | 0 | NULL | | 78 | Cwzwz | 27 | 14053717400 | mainapp/user/1.jpg | 0 | NULL | | 79 | Foywi | 72 | 12025274549 | mainapp/user/1.jpg | 0 | NULL | | 80 | Dmudk | 21 | 18903738960 | mainapp/user/1.jpg | 0 | NULL | | 81 | Rpigi | 61 | 15719609390 | mainapp/user/1.jpg | 0 | NULL | | 82 | Ebyya | 6 | 15868161998 | mainapp/user/1.jpg | 0 | NULL | | 83 | Lpyrw | 49 | 10826837644 | mainapp/user/1.jpg | 0 | NULL | | 84 | Vrzwt | 59 | 11887648920 | mainapp/user/1.jpg | 0 | NULL | | 85 | Aehlb | 37 | 11758169095 | mainapp/user/1.jpg | 0 | NULL | | 86 | Nflcs | 97 | 19277972193 | mainapp/user/1.jpg | 0 | NULL | | 87 | Cskfh | 42 | 10144477530 | mainapp/user/1.jpg | 0 | NULL | | 88 | Dcdkg | 17 | 13365980002 | mainapp/user/1.jpg | 0 | NULL | | 89 | Rxmlr | 30 | 10138835287 | mainapp/user/1.jpg | 0 | NULL | | 90 | Nbkgs | 99 | 18512247993 | mainapp/user/1.jpg | 0 | NULL | | 91 | Chngy | 25 | 13463924330 | mainapp/user/1.jpg | 0 | NULL | | 92 | Qfgfx | 34 | 18290436093 | mainapp/user/1.jpg | 0 | NULL | | 93 | Mhude | 38 | 14261308884 | mainapp/user/1.jpg | 0 | NULL | | 94 | Hiqpx | 2 | 15102418128 | mainapp/user/1.jpg | 0 | NULL | | 95 | Mbspo | 72 | 16787046148 | mainapp/user/1.jpg | 0 | NULL | | 96 | Guadb | 10 | 18779364258 | mainapp/user/1.jpg | 0 | NULL | | 97 | Gvqom | 22 | 14473507526 | mainapp/user/1.jpg | 0 | NULL | | 98 | Hqctf | 88 | 16007748620 | mainapp/user/1.jpg | 0 | NULL | | 99 | Yhvcs | 92 | 10880301957 | mainapp/user/1.jpg | 0 | NULL | | 100 | Tkhdj | 43 | 10153877694 | mainapp/user/1.jpg | 0 | NULL | | 101 | Lvtht | 16 | 19820153090 | mainapp/user/1.jpg | 0 | NULL | | 102 | Vpmco | 17 | 12413013696 | mainapp/user/1.jpg | 0 | NULL | | 103 | Tclle | 11 | 14200169776 | mainapp/user/1.jpg | 0 | NULL | | 104 | Itrly | 81 | 14104431190 | mainapp/user/1.jpg | 0 | NULL | | 105 | Szoha | 52 | 10227652216 | mainapp/user/1.jpg | 0 | NULL | | 106 | Sbolv | 27 | 17948711588 | mainapp/user/1.jpg | 0 | NULL | | 107 | Oeuvk | 53 | 13220381597 | mainapp/user/1.jpg | 0 | NULL | | 108 | Areaa | 87 | 18703864611 | mainapp/user/1.jpg | 0 | NULL | | 109 | Cfvok | 26 | 16854685686 | mainapp/user/1.jpg | 0 | NULL | | 110 | Vrytn | 22 | 10026080632 | mainapp/user/1.jpg | 0 | NULL | | 111 | Ebgri | 95 | 15171830513 | mainapp/user/1.jpg | 0 | NULL | | 112 | Hsgnw | 29 | 17909514795 | mainapp/user/1.jpg | 0 | NULL | | 113 | Gpkrp | 100 | 17483787036 | mainapp/user/1.jpg | 0 | NULL | | 114 | Lapmy | 68 | 13333333333 | mainapp/user/1.jpg | 0 | NULL | | 115 | www | 8 | NULL | mainapp/user/1.jpg | 0 | NULL | | 116 | qwert??????????????? | 0 | NULL | mainapp/user/1.jpg | 0 | NULL | +-----+----------------------+-----+-------------+----------------------------+--------+----------------------------------+ 115 rows in set (0.00 sec)
显然已经到位了
4.去Pycharm修改Django配置,调整到阿里云服务器上
把ip换一下就可以了,这里除了settings的还有celery的也要换
东西都在,可以试试看吧
redis也相应生成了数据
二、linux里面的方法
1.生成文件从docker中放到机器里
运行命令:
docker exec -it mysql1 mysqldump -uroot -p amo > /home/amo/amo_db.sql
可以在Pycharm里面看到相应位置有个amo_db.sql文件
copy后就可以来到本地paste
在Pycharm里面分别连接两个主机就可以传递文件了
在阿里云控制台执行下面的命令 把这个文件导入到aliyun数据库里面
2.先将文件拷贝到阿里云的docker容器里面
docker cp /home/amo_db.sql mysql1:/root/
3.进入容器并导入数据
docker exec -it mysql1
登录mysql
mysql -u root -p
创建数据库
create database amo2;
指定数据来源
use amo2 source /root/amo_db.sql
等待结束就能导入完成
导入的命令记录
这里是文件拷贝进去之后的运行记录
[root@dwg ~]# docker exec -it mysql1 bashroot@1009bfb23a3b:/# ls bin docker-entrypoint-initdb.d home media proc sbin tmp boot entrypoint.sh lib mnt root srv usr dev etc lib64 opt run sys var root@1009bfb23a3b:/# ls -a . bin docker-entrypoint-initdb.d home media proc sbin tmp .. boot entrypoint.sh lib mnt root srv usr .dockerenv dev etc lib64 opt run sys var root@1009bfb23a3b:/# dir bin docker-entrypoint-initdb.d home media proc sbin tmp boot entrypoint.sh lib mnt root srv usr dev etc lib64 opt run sys var root@1009bfb23a3b:/# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 79 Server version: 8.0.26 MySQL Community Server - GPL Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database amo2 -> ; Query OK, 1 row affected (0.01 sec) mysql> use amo2 Database changed mysql> source /root/amo_db.sql ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Enter password: /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL' at line 1 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.06 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.05 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.05 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 120 rows affected (0.01 sec) Records: 120 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected, 3 warnings (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 1 row affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.05 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.05 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected, 1 warning (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected, 1 warning (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.05 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 381 rows affected (0.02 sec) Records: 381 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 2 rows affected (0.01 sec) Records: 2 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 3 rows affected (0.01 sec) Records: 3 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected, 3 warnings (0.05 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 1 row affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.04 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.10 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.06 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 30 rows affected (0.01 sec) Records: 30 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.07 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 65 rows affected (0.01 sec) Records: 65 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.04 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 5 rows affected (0.00 sec) Records: 5 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 2 rows affected (0.01 sec) Records: 2 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected, 1 warning (0.05 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 1 row affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.02 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 1 row affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected, 1 warning (0.07 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.04 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 221 rows affected (0.02 sec) Records: 221 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.05 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 99 rows affected (0.01 sec) Records: 99 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.04 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 2000 rows affected (0.16 sec) Records: 2000 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.05 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 5152 rows affected (0.52 sec) Records: 5152 Duplicates: 0 Warnings: 0 Query OK, 5152 rows affected (0.20 sec) Records: 5152 Duplicates: 0 Warnings: 0 Query OK, 174 rows affected (0.02 sec) Records: 174 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 300 rows affected (0.02 sec) Records: 300 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.05 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 2899 rows affected (0.36 sec) Records: 2899 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.05 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 115 rows affected (0.01 sec) Records: 115 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.04 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) ERROR 1231 (42000): Variable 'character_set_client' can't be set to the value of 'NULL' Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) mysql> show tables ; +-------------------------------------+ | Tables_in_amo2 | +-------------------------------------+ | auth_group | | auth_group_permissions | | auth_permission | | auth_user | | auth_user_groups | | auth_user_user_permissions | | celery_taskmeta | | celery_tasksetmeta | | django_admin_log | | django_celery_beat_clockedschedule | | django_celery_beat_crontabschedule | | django_celery_beat_intervalschedule | | django_celery_beat_periodictask | | django_celery_beat_periodictasks | | django_celery_beat_solarschedule | | django_celery_results_chordcounter | | django_celery_results_taskresult | | django_content_type | | django_migrations | | django_session | | djcelery_crontabschedule | | djcelery_intervalschedule | | djcelery_periodictask | | djcelery_periodictasks | | djcelery_taskstate | | djcelery_workerstate | | t_goods | | t_gooods_label | | t_label | | t_order | | t_order_goods | | t_store | | t_store_goods | | t_user | | t_user_login | +-------------------------------------+ 35 rows in set (0.00 sec)
4.在阿里云控制台资源实例管理那里也可以传递文件
三、运行效果
视频链接,但觉也不是很慢https://live.csdn.net/v/174769
这篇关于2021-08-07-DJ-036 在阿里云服务器上迁移我们的数据库,以后省一台电脑的电费了的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-23Springboot应用的多环境打包入门
- 2024-11-23Springboot应用的生产发布入门教程
- 2024-11-23Python编程入门指南
- 2024-11-23Java创业入门:从零开始的编程之旅
- 2024-11-23Java创业入门:新手必读的Java编程与创业指南
- 2024-11-23Java对接阿里云智能语音服务入门详解
- 2024-11-23Java对接阿里云智能语音服务入门教程
- 2024-11-23JAVA对接阿里云智能语音服务入门教程
- 2024-11-23Java副业入门:初学者的简单教程
- 2024-11-23JAVA副业入门:初学者的实战指南