Jump to content

Compiling MySQL server

I'm gonna be honest. I got my task to create a shell script (never done that in my life but I'll figure it out later) which will: download, config, compile and install MySQL server (written in this other). Confusing part to me is that I would expect configuring a server after compilation and install. Are they just testing me or is this actually right order? What should I configure? (Literally all info that I got)

My plan is to first get it working by typing in terminal and than rewrite it to script. Do you think it's possible to do this with knowledge of some general programming but next to no knowledge on Linux and no knowledge of SQL.

It should work on any Unix like OS but that's very least of my problems at this point.

Any advice is welcome. I'm not naive so I obviously don't expect you to do it, just getting some general advice if what I'm about to do is realistic with basically googling and what they expect with configuration.

Link to comment
Share on other sites

Link to post
Share on other sites

Yes, it can be scripted quite easily. Configuration is the obvious next step, but depending on who asked you to do this it may not be your job to configure the server. Regardless, there isn't much configuring you can do without a list of requirements.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, Sauron said:

Yes, it can be scripted quite easily. Configuration is the obvious next step, but depending on who asked you to do this it may not be your job to configure the server. Regardless, there isn't much configuring you can do without a list of requirements.

Well it isn't to be deployed on any actual system for use so I don't know think that it really matters how it's configured. To me task isn't very clear.

 

My main question: is order configure before installing right? I have to admit that I'd expect to: download-compile-install-configure. Would it be possible to switch steps?

Link to comment
Share on other sites

Link to post
Share on other sites

I dont use mysql, and dont know bash scripting but this worked on my ubuntu machine as Gardening pointed out with that how-to link

 

wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.15.tar.gz
tar xvzf mysql-8.0.15.tar.gz
mkdir mysql-8.0.15/bld
cd mysql-8.0.15/bld
apt install libssl-dev
apt install libncurses5-dev
cmake .. -DDOWNLOAD_BOOST=1 -DWITH_BOOST=../cmake

Link to comment
Share on other sites

Link to post
Share on other sites

8 hours ago, krysta24 said:

My main question: is order configure before installing right? I have to admit that I'd expect to: download-compile-install-configure. Would it be possible to switch steps?

 

Some configuration yes. 

When you compile programs from source for *nix you configure the options you want for compile

 

You need to download the files, wether you do that with wget and un-tar it, or do a git clone or something. 

Then you run the ./configure or ./cmake command using any environment variables you might need, then run make which will compile it, then make install which will install it. 

 

The actual application specific configuration which is normally just a file like my.conf you do as the final step which will have like port, sockets, user, logging, connection limits, etc...

 

For MySQL in particular, you can see all the cmake options to configure the compile here: https://dev.mysql.com/doc/refman/5.5/en/source-configuration-options.html

You can see some of the options are to compile with zlib support, different storage engines, ssl support, change install directories, etc...

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO | 12 x 8TB HGST Ultrastar He10 (WD Whitelabel) | 500GB Aorus Gen4 NVMe | 2 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×