[Linux XAMPP - MySQL] Something wrong with new centOS

Problems with the Linux version of XAMPP, questions, comments, and anything related.

[Linux XAMPP - MySQL] Something wrong with new centOS

Postby DeadlYBlinder » 25. February 2020 08:42

I recently setup a new server with centOS 8 (core version) and deployed Xampp 7.4.1-1. (system info: Linux 3.10.0-1062.9.1.el7.x86_64 #1 SMP Fri Dec 6 15:49:49 UTC 2019)

Customization of database directory is one of the requirement, but during the process I have run into 2 problems:

1. mysql_install_db is not working properly (/opt/lampp/bin/mysql_install_db)
2. xampp could not identify mysql status for customized database directory

Problem:

1. mysql_install_db results
Code: Select all
chown: cannot access '/opt/lampp/lib/mysql/plugin/auth_pam_tool_dir': No such file or directory

I realized the package I installed on my server didn't include this
don't know if this is meant to be like this or it is the package I selected should not be used with this intall feature

Fix:
Anyway, I grabbed an official package down from MariaDB and complete the installation of customized location database.


2. xampp status problem

So the problem is that xampp could not recognize MySQL status when customized database location is being set (datadir parameter along with necessary setting in my.cnf).
Down here is the detail of explanation.

I did
Code: Select all
/opt/lampp/xampp start

I got
Code: Select all
Starting XAMPP for Linux 7.4.1-1...
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.


But when I did just follow the above situation
Code: Select all
/opt/lampp/xampp status

I got
Code: Select all
Version: XAMPP for Linux 7.4.1-1
Apache is running.
MySQL is not running.
ProFTPD is running.

With
Code: Select all
/opt/lampp/bin/mysql.server status

I got
Code: Select all
SUCCESS! MariaDB running


I understand that I could use mysql.server to control and check MySQL from time to time, but again it is a bit inconvenient as there is the xampp integrated control and display.

Fix:
I went into xampp script and found:
Code: Select all
/opt/lampp/share/xampp/status
/opt/lampp/share/xampp/statusraw


And then by checking both these script:
Code: Select all
/opt/lampp/var/mysql/` /bin/hostname`.pid mysqld


By changing this command within the script with my pid file in absolute database directory location string
The status could be fetched correctly.

Then I changed the code into
Code: Select all
if testrun $XAMPP_ROOT/var/mysql/`/bin/hostname`.pid mysqld || testrun $mysql_db` /bin/hostname`.pid mysqld

to replace the original script, which would help to recognize default database in xampp.
(However the mysql_db is fixed coded in this script, I wander if it could fetch datadir from my.cnf, of course this is not my requirement for this server, but I guess it could be an exploring case for more customized xampp in the future)

NOTE: this problem didn't just affect xampp status, it is also affecting the use of startMySQL(), stopMySQL() and reloadMySQL().


I don't know if the above problem has exist solution in current version or not, maybe just me hitting the problem, but hope this could be helpful, and if any suggestion in my case would be appreciated.
DeadlYBlinder
 
Posts: 1
Joined: 25. February 2020 03:59
XAMPP version: 7.4.1
Operating System: Linux centOS

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 75 guests