OPNsense Forum

English Forums => Development and Code Review => Topic started by: Individual on July 24, 2017, 06:34:18 pm

Title: About Mysql Server and Client
Post by: Individual on July 24, 2017, 06:34:18 pm
Hello All,
Firstly, I'm noob on the forum. If it is a mistake, you will be glad if you direct it to the right source.

I want to install mysql server to the opnsense. I want to integrate some own plugins with opnsense. But some our modules are using mysql database. For this requirement we need to install Mysql Server.

My Questions are :
1.) How can I install Mysql Server to opnsense?
2.) how can I make DVD/CD image with Mysql Server?

P.S. : When I type command # mysql -- I'm receiving "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"
Title: Re: About Mysql Server and Client
Post by: franco on July 24, 2017, 07:32:47 pm
Hi there,

We currently only have mysql56-client-5.6.36 and the PHP binding for it as a prebuilt package.

Under tools.git/config/17.1/ports.conf you would have to add "databases/mysql56-server" and then for the image build set:

# make dvd ADDITIONS=mysql56-server


Cheers,
Franco
Title: Re: About Mysql Server and Client
Post by: Individual on July 24, 2017, 09:13:36 pm
Thanks for the information Franco  :)

Can i install mysql server to already deployed opnsense appliance manualy? ( "pkg install mysql56-server" is not working. No package available on opnsense repo's ) Also we need to doing "make clean" "update core" etc.. after the add "databases/mysql56-server" parameter to ports.conf?

Thanks again.
Title: Re: About Mysql Server and Client
Post by: franco on July 24, 2017, 10:14:57 pm
For full builds you need to force the ports build, you can use "again" as a fake parameter:

# make ports-again dvd ADDITIONS=mysql56-server

You could also install the software on the installed OPNsense:

# opnsense-code tools ports
# cd /usr/ports/databases/mysql56-server
# make install

For quick package build purposes, you can create a package with this method, too:

# make package
# ls work/pkg


Cheers,
Franco