Fork me on GitHub

Rapport de message :*
 

Migration de base punBB vers Xoops 2.3.3 + cbb4 RC et problème de script SQL

Titre du sujet : Migration de base punBB vers Xoops 2.3.3 + cbb4 RC et problème de script SQL
par Jah sur 28/03/2009 16:54:42

Bonjour, je dois migrer une base PunBB version française 1.2.14.0 avec un interclassement en latin1_swedish_ci vers un Xoops 2.3.3 + cbb4 RC et un interclassement en utf8_unicode_ci

Plus un passage de PHP 4.4.4-8, MySQL 5.0.32 vers PHP 5.2.6-2, MySQL 5.0.67

Cette base fait 20 Mo compressé en gz, comment la convertir en utf8_unicode_ci ?
Pas trouvé de truc efficace.
A noter que je suis sous Linux, mais bon si il faut que le fasse sous Windaube, je prendrais sur moi
Y'a un topic içi avec des liens et des appli, mais j'arrive pas a le retrouver, bizarre.

Et j'ai un ptit problème avec le script de migration a exécuter dans la fenêtre SQL de phpmyadmin, j'obtiens cette erreur

Erreur

requête SQL
Documentation

# Create users
INSERT INTO xoops_usersuidunameemailpassnameurluser_icquser_msnmuser_aimuser_yimuser_fromuser_sigattachsigtimezone_offsetpostsuser_regdatelast_loginactkeyrank,
LEVEL )
SELECT idusernameemail,
PASSWORD realnameurlicqmsnaimyahoolocationsignatureshow_sigtimezonenum_postsregisteredlast_visitactivate_key01
FROM form_users
WHERE id 
<>1# Add users in registred users group

INSERT INTO xoops_groups_users_linkgroupiduid )
SELECT 2 uid
FROM xoops_users
WHERE uid 
<>1;

MySQL a répondu:Documentation
#1064 - 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 'insert into xoops_groups_users_link ( groupid, uid )
select 2uid from xoops_u' at line 5


Et là, je sèche totalement, j'y connais rien de chez que dalle, et j'arrive a rien malgrés mes recherches, so I need your help.
Apparemment il bloque sur l'instruction
select 2, uid from xoops_users where uid <>1; qu'il transforme en
select 2, uid from xoops_u'
bloqué par une apostrosphe qui n'existe pas dans le script, je pige pas.


Voici le script que m'a fourni Christian

# punbb to Xoops 2.0.x CBB 1.15 Converter
# Copyright (C) 2005 Christian EDOM https://www.frxoops.org
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

# Purpose:
#
# The script was designed to transfer categories, forums, users, and posts
# from Punbb (http://www.punbb.org) to Xoops 2.0.X with Forum CBB 1.15
#
# Assumptions:
#
#  - punbb, Xoops and CBB are installed on the same database
#  - Xoops and CBB are installed and punbb has contents to transfer
#  - Xoops tables are prefixed with "xoops_"
#
#  If your table prefixes differ, please do a global search on these prefixes,
#  replacing them with the correct prefixes for your installation.
#
# Directions:
#
# This script can be executed using phpMyAdmin or from the command line.
# Using phpMyAdmin, you can first click on the name of your database, then
# scroll down until you see "Run SQL query/queries on database".  You can either
# cut and paste this script into this area, or locate this script from your
# home machine by pressing the "Browse:" button and then clicking on "Go."
#
# Notes:
#
# Due to differences in supported functionality between punbb and Forum CBB 1.15,
# some items cannot be converted:
#
#  - Polls that accompany topics
#  - Topics watch (e-mail alerts when responses are posted)
#  - Security by categories and forums
#

# Create users

insert into xoops_users (uidunameemailpassnameurluser_icquser_msnmuser_aimuser_yimuser_fromuser_sigattachsigtimezone_offsetpostsuser_regdatelast_loginactkeyranklevel)
select idusernameemailpasswordrealnameurlicqmsnaimyahoolocationsignatureshow_sigtimezonenum_postsregisteredlast_visitactivate_key0,1 from form_users where id <>1

# Add users in registred users group

insert into xoops_groups_users_link (groupiduid)
select 2uid from xoops_users where uid <>1;

####  Forum CBB 1.15 ####

# Migration categories

insert into xoops_bb_categories (cat_idcat_titlecat_order)
select idcat_namedisp_position from form_categories


# Migration forums

insert into xoops_bb_forums (forum_idforum_nameforum_descforum_moderatorforum_topicsforum_postsforum_last_post_idforum_ordercat_id)
select idforum_nameforum_descmoderatorsnum_topicsnum_postslast_post_iddisp_positioncat_id from form_forums;


# Migration topics
insert into xoops_bb_topics (topic_idtopic_postertopic_titletopic_timetopic_last_post_idposter_nametopic_viewstopic_repliestopic_statustopic_stickyforum_id)
select idpostersubjectpostedlast_post_idlast_posternum_viewsnum_repliesclosedstickyforum_id from form_topics;

# Migration posts

insert into xoops_bb_posts
(post_idposter_nameuidposter_ippost_timetopic_idforum_idsubject)
SELECT form_posts.idform_posts.posterposter_idINET_ATON(poster_ip), form_posts.postedtopic_idforum_idsubject
FROM form_topics left join form_posts on form_topics
.id form_posts.topic_id
order by form_posts
.idform_posts.topic_id;

# Migration text posts
insert into xoops_bb_posts_text (post_idpost_text)
SELECT form_posts.idform_posts.message
FROM form_topics left join form_posts on form_topics
.id form_posts.topic_id
order by form_posts
.idform_posts.topic_id;

Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

68 Personne(s) en ligne (56 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 68 | Plus ...