<jupyter_start><jupyter_text>Export MySQL dump into PostgreSQL bash```bashsudo service mysql startmysql --user=root --password=<PASSWORD>``` MySQL```sqlSELECT DATNAME FROM PG_DATABASE;EXIT``` bash```bashpsql -U postgres -h localhost --password``` PostgreSQL```sqlCREATE DATABASE latest_categ;SELECT DATNAME FROM PG_DATABASE;EXIT```<jupyter_code>datname    
--------------
 postgres
 wiki_01
 template1
 template0
 bhrdwj
 latest_categ
(6 rows)<jupyter_output><empty_output><jupyter_text>bash```bashsudo apt updatesudo apt install pgloaderpgloader --version```<jupyter_code>pgloader version "3.6.1"
compiled with SBCL 1.4.15.debian<jupyter_output><empty_output><jupyter_text>bash```bashpgloader mysql://root:$MYSQL_ROOT_PASSWORD@localhost/latest_categ \         pgsql://postgres:$POSTGRES_PASSWORD@localhost/latest_categ```<jupyter_code>2021-11-23T16:35:38.015000Z LOG pgloader version "3.6.1"
2021-11-23T16:35:38.047000Z LOG Migrating from #<MYSQL-CONNECTION mysql://root@localhost:3306/latest_categ {1005D8F783}>
2021-11-23T16:35:38.047000Z LOG Migrating into #<PGSQL-CONNECTION pgsql://postgres@localhost:5432/latest_categ {1005ED3143}>
2021-11-23T16:35:49.849000Z LOG report summary reset
             table name     errors       rows      bytes      total time
-----------------------  ---------  ---------  ---------  --------------
        fetch meta data          0          4                     0.062s
         Create Schemas          0          0                     0.001s
       Create SQL Types          0          0                     0.005s
          Create tables          0          2                     0.023s
         Set Table OIDs          0          1                     0.007s
-----------------------  ---------  ---------  ---------  --------------
  latest_categ.category          0    2209005   169.9 MB          8.871s
-----------------------  ---------  ---------  ---------  --------------
COPY Threads Completion          0          4                     8.873s
 Index Build Completion          0          3                     2.726s
         Create Indexes          0          3                     6.928s
        Reset Sequences          0          1                     0.014s
           Primary Keys          0          1                     0.002s
    Create Foreign Keys          0          0                     0.000s
        Create Triggers          0          0                     0.001s
        Set Search Path          0          1                     0.001s
       Install Comments          0          0                     0.000s
-----------------------  ---------  ---------  ---------  --------------
      Total import time          ✓    2209005   169.9 MB         18.545s<jupyter_output><empty_output><jupyter_text>bash```bashpsql -U postgres -h localhost --password``` PostgreSQL```sqlSELECT SCHEMA_NAMEFROM INFORMATION_SCHEMA.SCHEMATA;```<jupyter_code>schema_name     
--------------------
 pg_toast
 pg_temp_1
 pg_toast_temp_1
 pg_catalog
 public
 information_schema
(6 rows)<jupyter_output><empty_output><jupyter_text>```sql\c latest_categ;```<jupyter_code>Password: 
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
You are now connected to database "latest_categ" as user "postgres".<jupyter_output><empty_output><jupyter_text>```sqlSELECT * FROM category WHERE false;```<jupyter_code>cat_id | cat_title | cat_pages | cat_subcats | cat_files 
--------+-----------+-----------+-------------+-----------
(0 rows)<jupyter_output><empty_output><jupyter_text>```sqlSELECT COUNT(*) FROM category;```<jupyter_code>count  
---------
 2209005
(1 row)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17133532771280935, 'fraction_numerical': 0.07016589611096002, 'mean_word_length': 1.5470914127423823, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 28, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '392404', 'license': 'MIT', 'n_tokens_mistral': 1239, 'n_tokens_neox': 1055, 'n_words': 223, 'path': 'notebooks/not-used/1.07-sfb-OBSOLETE-pgloader-mysql-to-postgres.ipynb', 'repo_name': 'bhrdj/predwikt', 'size': '3675'}