Installing ZXDB on your local computer

This is the place for general discussion and updates about the ZXDB Database. This forum is not specific to Spectrum Computing.
Ralf
Manic Miner
Posts: 617
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Installing ZXDB on your local computer

Post by Ralf » Fri Jan 19, 2018 9:21 pm

It's something that I wanted to do since ZXDB exists but never found enough determination to learn all the steps myself.

So Einar publishes from time to time new version of ZXDB. As I understand it is some big SQL script creating database, tables and populating them with data. I also understand it's MySql variant of SQL.

So to install it you'll need to have MySql server first. Then you can use a tool like SqlYog to connect to the database, execute sql queries and see the results

Image

My question is - how do you install MySql server on your personal computer? Is it possible on some regular PC that you turn on and off, that has standard Windows 7, that doesn't have any fixed IP address? It may be absolutely local for me, visible only on my computer. I googled a bit but it all seemed quite complicated. Any tutorial/help how to do it in an easy way would be much appreciated.

I have experience with SQL but I'm a type of a programmer and not an admin, better at writing code than configuring ;)
0 x

User avatar
kolbeck
Berk
Posts: 42
Joined: Mon Nov 13, 2017 9:04 pm

Re: Installing ZXDB on your local computer

Post by kolbeck » Fri Jan 19, 2018 9:27 pm

Hi

I’ve made a short tutorial on how to get quickly started with ZXDB using MariaDB in a container using Docker. Find it here https://github.com/thomasheckmann/zxinfo-db

Just realized that latest Docker requires Windows 10..

/thomas
Last edited by kolbeck on Fri Jan 19, 2018 11:00 pm, edited 2 times in total.
0 x
https://zxinfo.dk - another ZXDB frontend
https://api.zxinfo.dk/doc/ - ZXDB API for developers

User avatar
Mike Davies
Dizzy
Posts: 92
Joined: Mon Nov 13, 2017 10:11 am

Re: Installing ZXDB on your local computer

Post by Mike Davies » Fri Jan 19, 2018 9:28 pm

You should be able to install either MySQL or MariaDB (which might be a better option) on Windows. It will run as a service on your Windows machine, and your SQL Client (SqlYog) should be able to connect to the server via localhost -- so no need for any physical network.

Back when I was using Windows, I had WAMP running, which gives me a full-stack Apache webserver + PHP + MySQL -- that sounds like overkill for your needs.
0 x

User avatar
4thRock
Dizzy
Posts: 58
Joined: Thu Nov 09, 2017 9:35 am
Location: Portugal
Contact:

Re: Installing ZXDB on your local computer

Post by 4thRock » Fri Jan 19, 2018 10:30 pm

I use XAMPP and that will get you a local webserver with PHP + MySql.
It comes with PhpMyAdmin to manage the SQL database.

Installation is simple, and it doesn't mess your system. You just run it when needed.
0 x

User avatar
PeterJ
Site Admin
Posts: 595
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Installing ZXDB on your local computer

Post by PeterJ » Sat Jan 20, 2018 8:43 am

I use XAMPP on Windows too.

The file which Einar provides is a MySQL or MariaDB export file. If you use PHPMyAdmin as we do on our virtual server it's really easy to import the database.

Once you get XAMPP up and running I'm happy to talk you through it. I'm sure we can give you some simple SQL to get you started as well.

Note I have not watched this video so can't vouch for it's quality. Just off out but found it on YouTube and thought it may be useful.

0 x

Ralf
Manic Miner
Posts: 617
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: Installing ZXDB on your local computer

Post by Ralf » Sat Jan 20, 2018 10:45 am

Thanks guys! I succeeded in installing MySql Server and restoring ZXDB.

For anybody who would like to follow my path:

1) I decided for XAMPP. The instalation is really easy and the linked Youtube video is helpful. Mostly you click "OK" and "Continue". I probably installed much too much stuff for my needs but who cares? ;)

There was a tricky moment when it started showing me warnings that I have firewall on, antivirus program on and it may make MySql server run incorrectly. I ignored it, continued and it was a good move as everything just works.

2. When you ready with installation some configuration panel appears. I just clicked "Start" for MySql and it well... started:
Image

3. XAMPP already enables you some tool for working with SQL called phpMyAdmin but I found it unfriendly. Instead I decided for SqlYog. I had previous experience with it and find it nice. Type "sqlyog community" in Google to download a free version.

So I installed SqlYog and when run for the 1st time it detected my database automatically:
Image

4. Now I had to restore ZXDB on sql server and it was the hardest moment

So I downloaded the script from Einar's site and opened it in SqlYog. It's a huge script, 50 MB big but it worked. But when I executed it it made SqlYog hang :( Maybe if I waited for 2 hours or more it would complete. But I wasn't sure if it is working or hanging so I aborted it.

Eventually I succeeded in restoring the database from command line but it still lasted 10-15 minutes. Actually it was like loading a Spectrum game from a tape - you start something and later sit and say your prayers that everything works ;) But it worked, my computer is quite old and maybe that was the problem.

The command was:
C:\xampp\mysql\bin>mysql -u root -p test < e:\zxdb_latest_mysql.sql

You may have different paths but I hope you get the idea.

And that's all. Now I can play with ZXDB and am quite happy with it :)
2 x

User avatar
PeterJ
Site Admin
Posts: 595
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Installing ZXDB on your local computer

Post by PeterJ » Sat Jan 20, 2018 10:50 am

Well done!
0 x

User avatar
R-Tape
Site Admin
Posts: 1113
Joined: Thu Nov 09, 2017 11:46 am

Re: Installing ZXDB on your local computer

Post by R-Tape » Sat Jan 20, 2018 5:48 pm

Note to self - ZXDB is more than just a spreadsheet :mrgreen:
1 x

User avatar
RMartins
Manic Miner
Posts: 304
Joined: Thu Nov 16, 2017 3:26 pm

Re: Installing ZXDB on your local computer

Post by RMartins » Sat Jan 20, 2018 6:45 pm

R-Tape wrote:
Sat Jan 20, 2018 5:48 pm
Note to self - ZXDB is more than just a spreadsheet :mrgreen:
A lot more :lol:
1 x

User avatar
Seven.FFF
Manic Miner
Posts: 222
Joined: Sat Nov 25, 2017 10:50 pm
Location: USA

Re: Installing ZXDB on your local computer

Post by Seven.FFF » Sun Jan 21, 2018 12:02 am

AndyC wrote some nice scripts to convert to SQL Server, too. That's what I used at first, but I soon switched to native MySql on win10. MySqlWorkBench is not a bad IDE. It connects directly to the MySql dbs on my website hosting too, which is nice.
0 x
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
seven-fff.com/blog

Post Reply