jing shen wrote: > Hi Sergiu Dumitriu, > > Thank you for you reply. But I still can't resolve my problem. > > Others > > Importing SQL commands into your MySQL database > > Execute the following: > > mysql -u xwiki -p xwiki -h 127.0.0.1 < mycommands.sql
^^^ Where did you get this from? > I have creat a database which name is xwiki. and I also create a xwiki/xwiki > and grant all priviledge to it. except the top script. In fact, I don't know > why I need it. maybe it's just addition. > I also guess the xwiki will import database when it start. but in mu trace, > there are nothing about this. No, it doesn't import anything. It creates the tables it needs, but without any data. You will have to import the wiki pages later. > Deleted entity synthetic identifier rollback: disabled > Default entity-mode: pojo > Named query checking : enabled > building session factory > Not binding factory to JNDI, no JNDI name configured > Updating schema update for wiki [xwiki]... > Using dialect: org.hibernate.dialect.MySQLDialect > Failed updating schema while executing query [update xwikidoc set > xwd_translation=0 where xwd_translation is null] > com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'xwiki.xwikidoc' > doesn't exist > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1026) Where is this log from? > I think the green background is the hibernate init, and then, the error > occur. Why there are no action for import database between the two script? > Step by step: 1. Create the mysql database: create database xwiki; 2. Grant privileges to the user named 'xwiki': grant all privileges on xwiki.* to [EMAIL PROTECTED] identified by 'xwiki'; 3. Make sure that hibernate.cfg.xml contains the proper connection string and username/password: <property name="connection.url">jdbc:mysql://localhost/xwiki?useServerPrepStmts=false&sessionVariables=sql_mode=''</property> 4. Restart the container and open a page. This assumes that the container and the database server are on the same machine; if that isn't the case, then update points 2 and 3 accordingly: grant all privileges on xwiki.* to xwiki@'your.server.name' identified by 'your_password'; <property name="connection.url">jdbc:mysql://your.server.name/xwiki?useServerPrepStmts=false&sessionVariables=sql_mode=''</property> <property name="connection.password">your_password</property> > > > 2008/5/30, Sergiu Dumitriu <[EMAIL PROTECTED]>: >> jing shen wrote: >>> I use tomcat and mysql to install xwiki. I choose war file to deploy. But >>> after I finish the configure and visit the link( >> http://localhost:8080/xwiki/ >>> ). >>> >>> The error occur. I think maybe because I do not import the database >>> schema. But I can't find it in the war file. >>> >> As stated on >> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL >> you should run: >> >> create database xwiki >> grant all privileges on xwiki.* to [EMAIL PROTECTED] identified by 'xwiki' >> >> XWiki creates its tables when started, there's no need to import any >> schema. It just needs the right to do that. >> -- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
