匯入rhel4 mysql5.5到rhel4 mysql5.1
1,mysql -uroot -p123456 -hcapitek1
2,create database yisile;
3,use yisile;
4,source /mysql/data/mysql/export_yisile_table.sql #匯入表結構,這裡的sql源於mysqldump從源資料庫mysql5.5的匯出檔案
5,source /mysql/data/mysql/export_yisile_data.sql #匯入表資料
為了加深記憶,特附操作相關過程
匯入建表sql到rhel4 mysql5.1
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)
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 '[root@localhost /]' at line 1
mysql> show tables;#查詢匯入的表結構及表總數
+------------------------------+
| Tables_in_yisile |
+------------------------------+
| arti_article |
| arti_article_attachment |
| auxi_config |
| auxi_msg |
| auxi_msg_ctg |
| cms_admin |
| cms_admin_channel |
| cms_article_topic |
| cms_channel |
| cms_channel_attchment |
| cms_chnl_model |
| cms_chnl_model_item |
| cms_comment |
| cms_config |
| cms_content_ctg |
| cms_member |
| cms_member_group |
| cms_recommend_group |
| cms_recommend_item |
| cms_topic |
| core_admin |
| core_admin_function |
| core_admin_role |
| core_attachment |
| core_function |
| core_global |
| core_member |
| core_private_msg |
| core_private_msg_text |
| core_role |
| core_role_function |
| core_tpl_solution |
| core_user |
| core_user_role |
| core_website |
| down_download |
| down_download_attachment |
| down_type |
| fname |
| qa_answer |
| qa_composition |
| qa_composition_favorites |
| qa_composition_pingyue |
| qa_composition_property |
| qa_course |
| qa_grade |
| qa_grade_compositionproperty |
| qa_grade_course |
| qa_question |
| qa_question_favorites |
| vote_item |
| vote_record |
| vote_topic |
| yisile_channel |
| yisile_command |
| yisile_courseware |
| yisile_courseware_comment |
| yisile_courseware_type |
| yisile_courseware_vote |
| yisile_member_translist |
| yisile_membergroup_permi |
| yisile_members_verify |
| yisile_notice |
| yisile_notice_type |
| yisile_permission |
| yisile_teacher |
| yisile_teacher_grade_course |
| yisile_user_apply |
| yisile_virtual_currency_rule |
+------------------------------+
69 rows in set (0.00 sec)
mysql>
mysql> select table_name,table_rows from tables where table_schema='yisile';#檢視yisile資料庫所有表的表名及表記錄數
+------------------------------+------------+
| table_name | table_rows |
+------------------------------+------------+
| arti_article | 5272 |
| arti_article_attachment | 1323 |
| auxi_config | 12 |
| auxi_msg | 3 |
| auxi_msg_ctg | 2 |
| cms_admin | 76 |
| cms_admin_channel | 2401 |
| cms_article_topic | 59 |
| cms_channel | 289 |
| cms_channel_attchment | 0 |
| cms_chnl_model | 5 |
| cms_chnl_model_item | 500 |
| cms_comment | 19 |
| cms_config | 12 |
| cms_content_ctg | 5 |
| cms_member | 661 |
| cms_member_group | 4 |
| cms_recommend_group | 0 |
| cms_recommend_item | 0 |
| cms_topic | 10 |
| core_admin | 76 |
| core_admin_function | 0 |
| core_admin_role | 105 |
| core_attachment | 14902 |
| core_function | 117 |
| core_global | 1 |
| core_member | 1027 |
| core_private_msg | 0 |
| core_private_msg_text | 0 |
| core_role | 5 |
| core_role_function | 208 |
| core_tpl_solution | 88 |
| core_user | 0 |
| core_user_role | 0 |
| core_website | 11 |
| down_download | 13926 |
| down_download_attachment | 3 |
| down_type | 30 |
| fname | 0 |
| qa_answer | 1990 |
| qa_composition | 129 |
| qa_composition_favorites | 0 |
| qa_composition_pingyue | 189 |
| qa_composition_property | 8 |
| qa_course | 9 |
| qa_grade | 10 |
| qa_grade_compositionproperty | 0 |
| qa_grade_course | 63 |
| qa_question | 1763 |
| qa_question_favorites | 0 |
| vote_item | 5 |
| vote_record | 0 |
| vote_topic | 1 |
| yisile_channel | 8 |
| yisile_command | 3 |
| yisile_courseware | 33 |
| yisile_courseware_comment | 33 |
| yisile_courseware_type | 0 |
| yisile_courseware_vote | 1 |
| yisile_member_translist | 3957 |
| yisile_membergroup_permi | 7 |
| yisile_members_verify | 649 |
| yisile_notice | 0 |
| yisile_notice_type | 0 |
| yisile_permission | 9 |
| yisile_teacher | 2 |
| yisile_teacher_grade_course | 0 |
| yisile_user_apply | 33 |
| yisile_virtual_currency_rule | 4 |
+------------------------------+------------+
69 rows in set, 26 warnings (0.16 sec)
mysql>
mysql> use yisile;
Database changed
mysql> select * from down_type;#好像是有亂碼
+-------------+------------+-------------+-------------+----------+-------------+
| DOWNTYPE_ID | WEBSITE_ID | NAME | DESCRIPTION | PRIORITY | IS_DISABLED |
+-------------+------------+-------------+-------------+----------+-------------+
| 1 | 1 | ???????? | ???????? | 10 | 0 |
| 2 | 1 | ???????? | ???????? | 10 | 0 |
| 3 | 1 | ??????? | ??????? | 10 | 0 |
| 9 | 2 | ????? | ????? | 10 | 0 |
| 10 | 2 | ?????? | ?????? | 10 | 0 |
| 11 | 2 | ????? | ????? | 10 | 0 |
| 12 | 2 | ????? | ????? | 10 | 0 |
| 13 | 2 | ??? | ??? | 10 | 0 |
| 15 | 2 | ??? | ??? | 10 | 0 |
| 16 | 2 | ??? | ??? | 10 | 0 |
| 17 | 3 | ?????? | ?????? | 10 | 0 |
| 18 | 3 | ??? | ??? | 10 | 0 |
| 19 | 3 | ??? | ??? | 10 | 0 |
| 20 | 3 | ??? | ??? | 10 | 0 |
| 21 | 3 | ??? | ??? | 10 | 0 |
| 22 | 3 | ??? | ??? | 10 | 0 |
| 23 | 3 | ????? | ????? | 10 | 0 |
| 24 | 3 | ???? | ???? | 10 | 0 |
| 25 | 3 | ???? | ???? | 10 | 0 |
| 26 | 4 | ?????? | ?????? | 10 | 0 |
| 27 | 4 | ??????(???) | ??????(???) | 10 | 0 |
| 28 | 4 | ??? | ??? | 10 | 0 |
| 29 | 4 | ??? | ??? | 10 | 0 |
| 30 | 4 | ??? | ??? | 10 | 0 |
| 31 | 4 | ??? | ??? | 10 | 0 |
| 32 | 4 | ??? | ??? | 10 | 0 |
| 33 | 4 | ????? | ????? | 10 | 0 |
| 34 | 4 | ???? | ???? | 10 | 0 |
| 35 | 4 | ???? | ???? | 10 | 0 |
| 36 | 4 | ??? | ??? | 10 | 0 |
+-------------+------------+-------------+-------------+----------+-------------+
30 rows in set (0.00 sec)
mysql> select * from yisile_user_apply;
+---------+---------------+-----------+-----+-------------+-------+--------+-------------+---------------+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-------+
| USER_ID | CMS_MEMBER_ID | USER_NAME | SEX | MOBILE | GRIDE | COURSE | SCHOOL_NAME | SCHOOL_PHONE | SCHOOL_ADDRESS | NOTES | APPLY_TIME | STATE |
+---------+---------------+-----------+-----+-------------+-------+--------+-------------+---------------+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-------+
| 1 | 130 | ???? | 1 | 15937369622 | ??? | ??? | NULL | 0373-8427951 | ??????????????? | ???????????????? | 2010-05-17 15:10:17 | 0 |
| 2 | 594 | ? | 1 | 13466360312 | ???? | ??? | NULL | 010-51562198 | ??????????????????31??????4? | ??????????????16????????????????????????????????????????????????????????????????????????????????111 | 2010-05-18 10:37:16 | 0 |
| 3 | 133 | ???????? | 0 | 15910904960 | ???? | ??? | NULL | 010-65136513 | ???????????????? | ???????????????? | 2010-05-18 10:50:06 | 2 |
| 4 | 596 | ????? | 0 | 15863935278 | ???? | ??? | NULL | 0539-4291273 | ???????????? | ??????????????1963??10??6???????????47?????????????????????1984??????????????????????????????????????????????????????????????????????????????????????????2008????????????????????????????????????????????? | 2010-05-18 15:05:41 | 0 |
| 5 | 598 | ????? | 0 | 13482960755 | ???? | ??? | NULL | 0319-8651134 | ?????????????? | ???????????????????????????????????????????????????????????????????????????! | 2010-05-18 21:00:37 | 2 |
| 6 | 603 | ???? | 1 | 13833107489 | ??? | ??? | NULL | 010-51562198 | ?????????????????? | ?????????????????????????????????????????????????????????????????????????????????????????????????????????????? | 2010-05-19 10:58:39 | 0 |
| 7 | 604 | ????? | 1 | 13833107489 | ??? | ??? | NULL | 010-51562198 | ??????????????????31? | ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? | 2010-05-19 11:37:46 | 0 |
| 8 | 606 | ??? | 1 | 13466360312 | ???? | ??? | NULL | 010-51562198 | ????????????????? | ????????????????????????????????????????????????????????????????????????????????????????????????? | 2010-05-19 14:49:19 | 0 |
| 9 | 607 | ??? | 1 | 13466360312 | ??? | ??? | NULL | 010-51562198 | ?????????????????31? | ??????????????????????????????????????????????????????????????~~~??????????????? | 2010-05-19 15:09:02 | 0 |
| 10 | 608 | ??? | 1 | 13466360312 | ???? | ??? | NULL | 010-51562198 | ?????????????????31? | ????????????????????????????6???????????????????????????????????????????? | 2010-05-19 15:20:37 | 0 |
| 11 | 598 | ????? | 0 | 13482960755 | ???? | ??? | NULL | 0319-8651134 | ?????????????? | ?????????????????????????????????????????????????????????????????????????? | 2010-05-20 13:06:14 | 0 |
| 12 | 598 | ????? | 0 | 13482960755 | ???? | ??? | NULL | 0319-8651134 | ?????????????? | ???????????????? | 2010-05-24 09:08:58 | 0 |
| 13 | 633 | ??? | 1 | 13611343434 | ?? | ??? | NULL | 010-51518682 | ?????? | ?????? | 2010-05-24 11:19:29 | 0 |
| 14 | 646 | ????? | 1 | 13120296168 | ??? | ??? | NULL | 010-62303126 | ?????? | ?????? | 2010-06-02 15:56:10 | 2 |
| 15 | 649 | ????? | 0 | 13797402607 | ???? | ??? | NULL | 0730-3543321 | ?????????????????? | ???????????????????????????? | 2010-06-03 07:25:04 | 0 |
| 16 | 651 | ?????? | 0 | 13553152009 | ??? | ??? | NULL | 0531-84682123 | ???????????????????? | 2005????????????????????????????????????????????????????????????????????????????????????? | 2010-06-03 09:08:00 | 0 |
| 17 | 651 | ?????? | 0 | 13553152009 | ??? | ??? | NULL | 0531-84682123 | ???????????????????? | 2005???????????????????????????????????????????2009??????????????????????????????????????????????????????? | 2010-06-03 11:13:06 | 2 |
| 18 | 655 | ???? | 0 | 18922831897 | ??? | ??? | NULL | 0755-5621604 | ???????????????????? | ?????????????????? | 2010-06-03 16:17:02 | 0 |
| 19 | 658 | ????? | 0 | 13406786552 | ??? | ?? | NULL | 0534-3224839 | ?????????????????? | ??????????????????????????????flash?????? | 2010-06-03 22:49:20 | 0 |
| 20 | 659 | ????? | 1 | 15033492599 | ??? | ??? | NULL | 0315-7766028 | ????????????????????????? | ?????????????????????????????????????????????????????????????????? | 2010-06-04 08:14:51 | 0 |
| 21 | 663 | ??? | 1 | 13102645552 | ??? | ??? | NULL | 0345-3688774 | ??????????????? | ???????????????????????????????????????? | 2010-06-05 08:08:36 | 2 |
| 22 | 672 | ????? | 0 | 13932029580 | ??? | ?????? | NULL | 0310-2330685 | ?????????????17??????????? | ?????????????????????????? | 2010-06-06 08:22:05 | 0 |
| 23 | 675 | ??? | 0 | 15237932879 | ???? | ??? | NULL | 0379-66641530 | ??????????????????????????????? | ??????????????????????????????????????????????29?? | 2010-06-06 09:44:06 | 0 |
| 24 | 677 | ??????? | 0 | 15849618230 | ???? | ??? | NULL | 0476-5221292 | ??????????????????????? | 1992??????????????????????????????????????? | 2010-06-07 09:32:17 | 0 |
| 25 | 681 | ??? | 1 | 13898955424 | ?? | ??? | NULL | 0429-5848507 | ??????????????????????? | ??????????????????????????????? | 2010-06-08 09:14:21 | 0 |
| 26 | 690 | ?????? | 0 | 13460351968 | ???? | ??? | NULL | 0371-62181356 | ??????????? | ??????????????????????????????28???????????????????????????????????????????????????12???????????????????????????5????????100?????????????????????????????????? | 2010-06-09 07:11:05 | 0 |
| 27 | 126 | ?? | 0 | 15010997389 | ??? | ??? | NULL | 010-6933698 | sdsdfsdf | dsfsdfdsfsdf | 2010-06-09 16:40:05 | 2 |
| 28 | 730 | ?????? | 0 | 13234646677 | ??? | ?? | NULL | 0452-5833620 | ?????????????????? | ?????????? | 2010-06-13 07:46:07 | 0 |
| 29 | 718 | ?? | 1 | 13941299910 | ???? | ??? | NULL | 0412-3204165 | ??????????????????????? | ?? ??? ??????78??10???1997??8???????????????????????????????????????????????????????????????????????????????????????????????
| 2010-06-13 11:04:21 | 0 |
| 30 | 750 | ??? | 0 | 13466360312 | ???? | ??? | NULL | 010-51562198 | ?????????4? | ???????? | 2010-06-17 11:53:37 | 0 |
| 31 | 751 | ????? | 1 | 13466360312 | ???? | ??? | NULL | 010-51562198 | ?????????4? | ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? | 2010-06-17 15:00:37 | 0 |
| 32 | 753 | ????? | 0 | 13466360312 | ??? | ??? | NULL | 010-51562198 | ???????????????4? | ?????????? | 2010-06-17 16:37:41 | 0 |
| 33 | 126 | ??? | 1 | 15010997389 | ??? | ??? | NULL | 010-1000000 | ?????? | ?????? | 2010-06-17 17:39:49 | 0 |
+---------+---------------+-----------+-----+-------------+-------+--------+-------------+---------------+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-------+
33 rows in set (0.00 sec)
mysql> select * from cms_config;
公司的rhel4 mysql5.5資料是匯入進來了,如何去驗證資料呢?
1,不同的mysql之間的遷移資料庫,由於不同字符集問題,如何處理亂碼?
2,匯入到目錄資料庫(mysql),如何去驗證資料庫的資料:
1,表數,記錄數,約束,索引,還有什麼?
b,驗證源mysql資料庫的所有資料物件:可能有儲存過程,檢視等
目前想到這些,請大家補充!謝謝!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-665688/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- rhel4 mysql5.5 字符集_character setMySql
- rhel4 mysql5.1登陸ERROR 1045 (28000): Access denied for userMySqlError
- rhel4 mysql5.1 索引index_約束constraint建立_刪除_查詢MySql索引IndexAI
- rhel4 mysql5.5字符集_客戶端mysql亂碼處理MySql客戶端
- 通過mysqladmin為rhel4 mysql5.1 root使用者新增密碼_更改密碼MySql密碼
- rhel4的ftp的配置FTP
- RHEL4下配置HTTPSHTTP
- 配置rhel4的raw device servicedev
- oracle asmlib 新的下載地址 for rhel4OracleASM
- 在rhel4中檢視mysql的版本MySql
- rhel4 mysql5.1_server_client安裝備紀MySqlServerclient
- 配置rhel4的rdate時間同步服務
- 修改oracle 10g rac(rhel4)的vipOracle 10g
- RHEL4上安裝oracle9i-9.2.0.4Oracle
- 近期oracle10g rac(rhel4)測試提要Oracle
- 新增節點oracle10g rac(rhel4)_clusterwareOracle
- 新增節點oracle10g rac(rhel4)_databaseOracleDatabase
- 二述_rhel4利用loop device deploying asm storageOOPdevASM
- 在rhel4上如何通過grub boot loader進入單使用者模式boot模式
- oracle10g rac(rhel4)_rootdelete.sh出錯Oracledelete
- oracle10g rac(rhel4)__crsctl_srvctl_ocrctl命令Oracle
- 新增節點oracle10g rac(rhel4)_instanceOracle
- 改變oracle10g rac(rhel4)歸檔模式Oracle模式
- 如何(rhel4 mysql 5.5)在命令列模式中操作mysql(一)MySql命令列模式
- rhel4解除安裝系統自帶的mysql4.1MySql
- rhel4 oracle 10g rac安裝問題集錦Oracle 10g
- 刪除oracle10g rac(rhel4)節點_例項Oracle
- 刪除oracle10g rac(rhel4)節點_節點Oracle
- 安裝9204 for rhel4出現的問題總結
- [轉]針對 RHEL4 管理員的 AIX 提示-把 Red Hat Linux 技能擴充套件到 UNIXAILinux套件
- [轉]針對 RHEL4 管理員的 AIX 提示——把 Red Hat Linux 技能擴充套件到 UNIXAILinux套件
- 如何通過命令列(command line)登陸rhel4 mysql命令列MySql
- oracle10g rac(rhel4)_load balancing_taf(一)Oracle
- oracle10g rac(rhel4)_load balancing_taf(二)Oracle
- oracle10g rac(rhel4)_load balancing_taf(三)Oracle
- oracle10g rac(rhel4)_load balancing_taf(四)Oracle
- 在rhel4上安裝oracle 10.2.0.1出錯的怪問題Oracle
- oracle10g rac(rhel4)_ocfs2_ocfs_配置及資訊摘要Oracle