Announcement

#1 2018-05-15 10:19:27

ra6768
Member
2018-01-08
17

Migrating from XAMP to LAMP

Hello/Hi/Greetings,

I have piwigo running on a XAMP setup and it works fine. I have set up now a new machine running Ubuntu Server 18.04 LTS with MySQL installed. I have MySQL because some other software requires it to run. I want to migrate my piwigo installation to the new Linux computer. How can I do that in the best way? I thought about copying the piwigo installation to the same folder in the apache server in the linux machine, dump the MaridDB and load into MySQL, but I don't really know if this is OK. Any suggestions are very welcome.

Piwigo version: 2.9.2
PHP version: 5.6.15
MySQL version: 5.5.5-10.1.9-MariaDB
Piwigo URL: http://internal

Offline

 

#2 2018-05-15 19:19:06

Zentalquabula
Member
2014-05-10
91

Re: Migrating from XAMP to LAMP

What software would require MySQL rather than MariaDB?

I suggest you do the following:

sudo apt update

sudo apt install apache2 apache2-utils mariadb-server mariadb-client php php-imagick php-pear php-ssh2 php-xml php7.2-curl php7.2-dev php7.2-fpm php7.2-gd php7.2-intl php7.2-mbstring php7.2-xml php7.2-mysql ffmpeg graphicsmagick imagemagick mediainfo mysqltuner zip

sudo systemctl enable mariadb.service
sudo mysql_secure_installation

Then enter MySQL:

mysql -u root -p

and enter:

grant all privileges on *.* to 'root'@'localhost' identified by 'yourpassword';
flush all privileges;

Edit .my.cnf in your home directory:

pico .my.cnf

Add this:

[client]
user=root
password=yourpassword
socket=/var/run/mysqld/mysqld.sock

Secure it:

chmod 600 .my.cnf

FIx a bug by adding password to this file:

sudo pico /etc/mysql/debian.cnf

Fix apache2:

sudo a2enconf php7.2-fpm
sudo a2enmod proxy_fcgi setenvif actions expires http2 rewrite headers
sudo a2dismod access_compat
sudo systemctl reload apache2

Then import your databasedump to mysql:

mysql -u root databasename < databasename.sql

Add a proper user if necessary (or just use root in your piwigo config), then you are set, provided you just want to use piwigo in /var/www. Else define a new vhost in apache.

Offline

 

#3 2018-05-15 20:41:26

ra6768
Member
2018-01-08
17

Re: Migrating from XAMP to LAMP

Hi,
Thank you for your answer, very appreciated.

Dolibarr requires MySQL or PostgreSQL, this is an open source ERP & CRM for businesses, very good one as a matter of fact and something I can't remove from the server Piwigo will be installed in.

I already have an apache2 server installed, configured and secured with firewall, SSL certificates etc, that's not a problem. It is not a problem installing all the required modules neither.

I never use "root" for anything, instead I use a user with the same privileges, but anyway I get your point, I need a user with elevated privileges for the database and I already have that.

From your answer it seems that I can't use MySQL to load the MariaDB database, rather I have to install an instance of MariaDB and then load the database backup to it. Did I understand you correctly?

I found this article https://dev.mysql.com/doc/refman/8.0/en … vers.html, but I was looking for something simpler, like adding Piwigo database to the already existing MySQL instance without having the need for MariaDB. I'll try to do just that and see if it works or not, after all in the Piwigo minimum requirements it says "MySQL 5"(or the equivalent with MariaDB). So it may work.

Again, thank you very much for your answer and I'll report back here with more questions or success, either way, I'll be back.
Regards,
VV

Offline

 

#4 2018-05-15 21:05:08

Zentalquabula
Member
2014-05-10
91

Re: Migrating from XAMP to LAMP

MariaDB is a drop-in replacement to MySQL, they are entirely compatible database wise. MariaDB is more efficient, though.

Offline

 

#5 2018-05-15 22:44:56

ra6768
Member
2018-01-08
17

Re: Migrating from XAMP to LAMP

Hi again,
Thanks for clearing that up, I didn't know they were entirely compatible. Now I feel more confident to do what I planned to do. It should work then. I'll report back anyway to confirm, but it should be straight forward.
My best regards,
VV

Offline

 

#6 2018-06-06 11:44:21

ra6768
Member
2018-01-08
17

Re: Migrating from XAMP to LAMP

Hi Again,
It works! Thank you!
I haven't had much time for this, but now I spare some minutes and migrated piwigo from Xampp (MariaDB) to apache2 on Ubuntu 18.04 LTS (MySQL) and it worked just as the people helping me here said it would. Thank you very much Zentalquabula for your help, very much appreciated.
My best regards,
VV

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2018 · Contact