You are not logged in.

#1 2017-09-21 03:59:58

abdulhakeem
Member
From: Chicagoland
Registered: 2016-07-31
Posts: 36
Website

[RESOLVED] Trying to Set Up local XAMPP and WordPress Environment

Hello everyone,

I am trying to set up a LAMP local server for WordPress development, but I'm running into some trouble with the MySQL configuration. I think the problem has something to do with some sort of missing or misconfigured socket but I'm not entirely sure where the problem lies or how to fix it (not really sure what a socket even is...)

Loosely following this tutorial:
https://www.digitalocean.com/community/ … arch-linux

What I've Done:

Installed XAMPP from AUR

Ran

/opt/lampp/lampp security

as described in the XAMPP wiki page, set passwords for everything, etc

Ran

sudo lampp start

and it says the whole stack is running


But the problem lies when I try anything related to MySQL:

If I try to run

mysql -u root -p

for example, I get:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2 "No such file or directory")

If I try to run

systemctl status mariadb

, I get this:

mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: failed (Result: protocol) since Wed 2017-09-20 22:39:04 CDT; 14min ago
  Process: 5140 ExecStart=/usr/bin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 5085 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || e
  Process: 5084 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 5140 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Sep 20 22:39:03 thinkpad systemd[1]: Starting MariaDB database server...
Sep 20 22:39:04 thinkpad mysqld[5140]: 2017-09-20 22:39:04 140528200839104 [Note] /usr/bin/mysqld (mysqld 10.1.26-MariaDB) starting as process 5140 ...
Sep 20 22:39:04 thinkpad mysqld[5140]: 2017-09-20 22:39:04 140528200839104 [Warning] Can't create test file /opt/lampp/mysql/thinkpad.lower-test
Sep 20 22:39:04 thinkpad mysqld[5140]: 2017-09-20 22:39:04 140528200839104 [ERROR] mysqld: File './mysql-bin.index' not found (Errcode: 13 "Permission denied")
Sep 20 22:39:04 thinkpad mysqld[5140]: 2017-09-20 22:39:04 140528200839104 [ERROR] Aborting
Sep 20 22:39:04 thinkpad systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Sep 20 22:39:04 thinkpad systemd[1]: Failed to start MariaDB database server.
Sep 20 22:39:04 thinkpad systemd[1]: mariadb.service: Unit entered failed state.


So clearly something is wrong with MySQL/mariadb, since the previous error message about the missing socket seems to indicate that MySQL is not running, yet XAMPP/LAMP says that it is:

sudo lampp status

Version: XAMPP for Linux 7.1.1-0
Apache is running.
MySQL is running.
ProFTPD is running.

So I think there's some sort of conflict going on, or a incorrect config file, or something, but I can't pinpoint exactly where the problem lies.

Does anyone know what I'm missing here? Should I just uninstall the whole stack and start over?

EDIT:

Resolved by just ditching XAMPP and manually installing the LAMP stack as per the Arch Wiki

Last edited by abdulhakeem (2017-10-08 16:41:50)


And the worldly life is not but amusement and diversion; but the home of the Hereafter is best for those who fear Allah, so will you not reason? {6:32}

Offline

#2 2017-09-21 04:34:35

cirkit
Member
From: San Francisco
Registered: 2008-01-29
Posts: 80
Website

Re: [RESOLVED] Trying to Set Up local XAMPP and WordPress Environment

First of all, this xampp package in AUR is flagged as outdated. You're also looking at a non-supportive and obsolete article from 2012. You should instead be following the official Arch Wiki which does explain how to configure MySQL for Wordpress.

Offline

#3 2017-09-21 04:55:21

abdulhakeem
Member
From: Chicagoland
Registered: 2016-07-31
Posts: 36
Website

Re: [RESOLVED] Trying to Set Up local XAMPP and WordPress Environment

Didn't think only being just under 2 months out of date would break usability but I suppose I can just install manually as per the wiki.

I stated I was only loosely following that article, just to get a better general idea of what I'm doing.

I've been reading the XAMPP, MySQL, and WordPress wiki pages, but none of them mention this error I'm encountering, and I'm fairly certain I've followed the installation steps correctly. Just can't seem to find anything about this error, or why mariadb won't actually run/start. Hence this post.

The Wiki for MySQL mentioned making datadir=/var/lib/mysql, but I'm not sure if it should actually be /opt/lampp/mysql, or if that has anything to do with the problem...


And the worldly life is not but amusement and diversion; but the home of the Hereafter is best for those who fear Allah, so will you not reason? {6:32}

Offline

#4 2017-09-21 06:32:55

thepasto
Member
From: trash:///
Registered: 2009-03-16
Posts: 56

Re: [RESOLVED] Trying to Set Up local XAMPP and WordPress Environment

I think you're a bit confused about lampp services and system services. Lampp is using its opt folder as root. So if you want to connect to lampp mysql you should run, adjust your lampp installation path,

/opt/lampp/bin/mysql -u root -p

Offline

#5 2017-09-21 08:05:41

seth
Member
Registered: 2012-09-03
Posts: 51,053

Re: [RESOLVED] Trying to Set Up local XAMPP and WordPress Environment

The AUR package was only submitted once (the day the sf page was created only to upload this single tarball!)), reported to be "broken" (or whatever) in august and does *not* provide some automagic installation and setup of the relevant archlinux packages, but performs a side-installation.

a) If you're looking for an automated installation, you're using the wrong distro anyway.
b) the particular AUR package looks *highly* suspicious (because of the trackless single day creation of everything) - don't install random shit from AUR; it's your job to take care when dealing with those packages - they're completely unreviewed.

Offline

#6 2017-09-21 08:15:47

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [RESOLVED] Trying to Set Up local XAMPP and WordPress Environment

You *really* don't want to use some old unmaintained apache package

Last edited by Mr.Elendig (2017-09-21 08:16:33)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#7 2017-09-21 11:49:22

abdulhakeem
Member
From: Chicagoland
Registered: 2016-07-31
Posts: 36
Website

Re: [RESOLVED] Trying to Set Up local XAMPP and WordPress Environment

thepasto wrote:

I think you're a bit confused about lampp services and system services. Lampp is using its opt folder as root. So if you want to connect to lampp mysql you should run, adjust your lampp installation path,

/opt/lampp/bin/mysql -u root -p

This was the problem. The entire LAMPP stack is self-contained in /opt/lampp, so installing mariadb in the first place wasn't even necessary.

I also removed the AUR package and just downloaded the installer straight from XAMPP's website.

Seems to be working now, if I go to localhost in a browser, I get the XAMPP landing page

Marking as resolved smile


And the worldly life is not but amusement and diversion; but the home of the Hereafter is best for those who fear Allah, so will you not reason? {6:32}

Offline

#8 2017-09-21 12:35:50

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: [RESOLVED] Trying to Set Up local XAMPP and WordPress Environment

abdulhakeem wrote:

I also removed the AUR package and just downloaded the installer straight from XAMPP's website.

Don't! Just don't do this. Never install things in Arch outside of pacman or it will cause issues at some point. Remeber, it's not "if", it's "when" it causes problems.

Secondly, why not just install MySQL/Maria, Apache and WordPress and just configure it that way? You're going to have to do it anyway, and trust me -- you'll appreciate the knowledge you gain, pluse be ready for when your app is deployed outside of some fenced environment like XAMPP.


Matt

"It is very difficult to educate the educated."

Offline

#9 2017-09-21 12:55:21

abdulhakeem
Member
From: Chicagoland
Registered: 2016-07-31
Posts: 36
Website

Re: [RESOLVED] Trying to Set Up local XAMPP and WordPress Environment

mrunion wrote:
abdulhakeem wrote:

I also removed the AUR package and just downloaded the installer straight from XAMPP's website.

Don't! Just don't do this. Never install things in Arch outside of pacman or it will cause issues at some point. Remeber, it's not "if", it's "when" it causes problems.

Secondly, why not just install MySQL/Maria, Apache and WordPress and just configure it that way? You're going to have to do it anyway, and trust me -- you'll appreciate the knowledge you gain, pluse be ready for when your app is deployed outside of some fenced environment like XAMPP.

Well there's no official XAMPP package and the AUR package is outdated and apparently not trustworthy according to others on this thread, so it seemed downloading from XAMPP's site was the only option. I'd update/maintain the AUR package myself if I knew how...

I suppose I could install all the components manually... I'm still learning all this stuff. I'm doing this Udemy course on WordPress and they say to install MAMP for local development purposes, but there is no MAMP for Linux, XAMPP is the closest equivalent. I was just trying to keep it as simple as possible since it's just for training/education.

Last edited by abdulhakeem (2017-09-21 12:57:27)


And the worldly life is not but amusement and diversion; but the home of the Hereafter is best for those who fear Allah, so will you not reason? {6:32}

Offline

#10 2017-09-21 13:50:04

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,806
Website

Re: [RESOLVED] Trying to Set Up local XAMPP and WordPress Environment

mrunion wrote:
abdulhakeem wrote:

I also removed the AUR package and just downloaded the installer straight from XAMPP's website.

Don't! Just don't do this. Never install things in Arch outside of pacman or it will cause issues at some point. Remeber, it's not "if", it's "when" it causes problems.

Secondly, why not just install MySQL/Maria, Apache and WordPress and just configure it that way? You're going to have to do it anyway, and trust me -- you'll appreciate the knowledge you gain, pluse be ready for when your app is deployed outside of some fenced environment like XAMPP.

xampp puts everything in /opt, i think it is safe to use


https://ugjka.net
paru > yay | webcord > discord
pacman -S spotify-launcher
mount /dev/disk/by-...

Offline

#11 2017-09-21 14:04:20

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [RESOLVED] Trying to Set Up local XAMPP and WordPress Environment

ugjka wrote:
mrunion wrote:
abdulhakeem wrote:

I also removed the AUR package and just downloaded the installer straight from XAMPP's website.

Don't! Just don't do this. Never install things in Arch outside of pacman or it will cause issues at some point. Remeber, it's not "if", it's "when" it causes problems.

Secondly, why not just install MySQL/Maria, Apache and WordPress and just configure it that way? You're going to have to do it anyway, and trust me -- you'll appreciate the knowledge you gain, pluse be ready for when your app is deployed outside of some fenced environment like XAMPP.

xampp puts everything in /opt, i think it is safe to use

except it has a history of being full of holes.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#12 2017-09-21 14:10:28

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,806
Website

Re: [RESOLVED] Trying to Set Up local XAMPP and WordPress Environment

Mr.Elendig wrote:
ugjka wrote:
mrunion wrote:

Don't! Just don't do this. Never install things in Arch outside of pacman or it will cause issues at some point. Remeber, it's not "if", it's "when" it causes problems.

Secondly, why not just install MySQL/Maria, Apache and WordPress and just configure it that way? You're going to have to do it anyway, and trust me -- you'll appreciate the knowledge you gain, pluse be ready for when your app is deployed outside of some fenced environment like XAMPP.

xampp puts everything in /opt, i think it is safe to use

except it has a history of being full of holes.

So is archlinux https://security.archlinux.org/


https://ugjka.net
paru > yay | webcord > discord
pacman -S spotify-launcher
mount /dev/disk/by-...

Offline

#13 2017-09-21 15:33:57

seth
Member
Registered: 2012-09-03
Posts: 51,053

Re: [RESOLVED] Trying to Set Up local XAMPP and WordPress Environment

Side installations tend to end up being bitrot, though. And fast.

Since there's nothing like a "XAMPP" package but XAMPP simply lists the someunix™/apache/mariadb/perl/php stack, there is *absolutely* no reason to go with unmaintained side installations in this case. Arch *does* ship all elements of a XAMPP system, just not as pre-configured set or whatever.

I'm totally with mrunion here - trying to sneak a "quick" solution is gonna bite you back badly. Especially when dealing with flaky CMS.
And on top of that, you get *far* more flexibility if you build a XAMPP stack from arch elements.

Offline

#14 2017-09-21 20:51:57

loqs
Member
Registered: 2014-03-06
Posts: 17,325

Re: [RESOLVED] Trying to Set Up local XAMPP and WordPress Environment

ugjka wrote:

Are you sure any of the vulnerabilities listed against any of the kernel packages as vulnerable are actually still vulnerable?
Not stating arch does not have security issues just that list appears to be manually updated and lag behind package status.

Offline

#15 2017-09-22 06:39:41

seth
Member
Registered: 2012-09-03
Posts: 51,053

Re: [RESOLVED] Trying to Set Up local XAMPP and WordPress Environment

Seems to be all the stack clash.

Offline

#16 2017-09-22 21:47:56

loqs
Member
Registered: 2014-03-06
Posts: 17,325

Re: [RESOLVED] Trying to Set Up local XAMPP and WordPress Environment

seth wrote:

Seems to be all the stack clash.

Yes various aspects to stack clash apart from https://security.archlinux.org/AVG-331 which is msnd and fixed by https://git.kernel.org/pub/scm/linux/ke … 150fd6a803
in 4.12.13 from upstream commit https://git.kernel.org/pub/scm/linux/ke … 20de2b8021 which covers 4.13+
Other kernel CVE's such as CVE-2017-14340 have been fixed without ever being allocated on security.archlinux.org.

Offline

Board footer

Powered by FluxBB