Skip to content

Latest commit

 

History

History
61 lines (43 loc) · 2.11 KB

File_wikt_parsed_empty_sql.md

File metadata and controls

61 lines (43 loc) · 2.11 KB

This step should be done before the parsing of the Wiktionary database (see Getting started with Wiktionary parser).

MySQL

mysql$ CREATE DATABASE enwikt20100824_parsed;
mysql$ USE enwikt20100824_parsed
mysql$ SOURCE D:\all\projects\java\synonyms\wikokit\wikt_parser\doc\wikt_parsed_empty.sql
mysql$ GRANT SELECT ON enwikt20100824.* TO javawiki@'%';
mysql$ GRANT ALL ON enwikt20100824_parsed.* TO javawiki@'%';
mysql$ FLUSH PRIVILEGES;

If MySQL whines and prints error message that access is denied then you can try use "localhost" instead of "%":

mysql$ GRANT SELECT ON enwikt20100824.* TO javawiki@'localhost';

You can list the privileges that are granted to a MySQL user account ('javawiki'):

mysql$ SHOW GRANTS FOR javawiki;

Details

  • Edit wikt_parsed_empty.mwb file in MySQL Workbench, export it to wikt_parsed_empty.sql
  • Make substitution in wikt_parsed_empty.sql in VIM by RE:
%s/`mydb`\.//g
  • Create DB in MySQL, e.g. ruwikt20090122_parsed
  • USE ruwikt20090122_parsed
  • SOURCE wikt_parsed_empty.sql

Machine-readable database schema

The structure (tables and relations) of the Wiktionary parsed database (database layout):

Wiktionary parsed database

Set of tables related to quotations (fragment of the Wiktionary parsed database):

quotations tables of the Wiktionary parsed database

Misc

Index

CREATE TABLE test (id INT, INDEX(id));

ALTER TABLE relation DROP INDEX idx_software_key , ADD INDEX idx_software_key ( software_key ( 3 ) );

See also

  • MySQLWorkbench - How to create empty SQL file for the Wiktionary parsed database.

Previous step

Next step