Start a new topic

Installing MySQL for Total Recall on your Maco

These instructions are for the old chip architecture (pre 2020).


Go to https://dev.mysql.com/downloads/file/?id=508095, log in and download this one:


image

Double-click on the downloaded DMG, install MySQL.


In the System > Preferences pane you will see a new icon:


image


When you click on it, you'll get to the MqSQL pane:


image


You can check whether MySQL is running.


Open a Terminal window (CMD+Space, type 'Terminal').


In the terminal, type: /usr/local/mysql/bin/mysql -u root -p

Press Enter.


(In these instructions I'll use europarlsql as the name of the example database.)


Then type: CREATE DATABASE europarlsql;

Press Enter.


Then type: USE europarlsql;

Press Enter.

Now you have created an MySQL database, named europarlsql.


Save the connector that's attached to this posting (or download it from the website above). File name: mysql-connector-java-8.0.27.jar.


Start CafeTran Espresso, drag the file mysql-connector-java-8.0.27.jar on the Dashboard. Quit CafeTran Espresso.


Launch CafeTran Espresso, open the Preferences.


On the General pane, in the second box, select MySQL:


image



Click on Database connection. Enter three values:


root

the password that you've assigned when creating the database

the name of the database (I've marked it in blue):


image


Click OK. Quit CafeTran Espresso.


Launch CafeTran Espresso, in the Dashboard, click on the New icon in the bottom left:


image


Type a name for a new table in the database europarlsql.


Import your TMX file.

jar

Here's the log file I got from the Terminal commands above:


 

MacBook-Pro:~ hl$ /usr/local/mysql/bin/mysql -u root -p
Enter password: abc

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.27 MySQL Community Server - GPL

mysql> CREATE DATABASE europarlsql;
Query OK, 1 row affected (0.00 sec)

mysql> USE europarlsql;
Database changed

 

To be clear: the password for the database user ‘root’ is set during the installation of MySQL.
WARNING: CafeTran stores the password for the MySQL database unencrypted, so you probably don’t want to use a critical password for it.

My choice to name the database 'europarlsql' wasn't a smart one.


Instead, I should have named it something like 'TOTALRECALL'.


And in TOTALRECALL I should have created a table called 'europarlsql'.

Here's how to count the number of records in an MSQL table:

 

/usr/local/mysql/bin/mysql -u root -p
CREATE DATABASE TOTALRECALL;
USE TOTALRECALL;
SELECT COUNT(*) FROM DGT_de_nl;

 Feedback:


image


Oops, line 2 should have been there. So the command becomes:

 

/usr/local/mysql/bin/mysql -u root -p
USE TOTALRECALL;
SELECT COUNT(*) FROM DGT_de_nl;

 

Login to post a comment