You are not logged in.
when i install mysql
Warning: Inconsistent permissions on directory /run/
:: You need to initialize the MySQL data directory prior to starting
the service. This can be done with mysqld --initialize command, e.g.:
mysqld --initialize --user=mysql --basedir=/usr --datadir=/var/lib/mysql
:: Additionally you should secure your MySQL installation using
mysql_secure_installation command after starting the mysqld serviceand when I reinstall mysql
Warning: Inconsistent permissions on directory /run/
Filesystem: 755 Packages: 775
Warning: Inconsistent permissions on directory /var/lib/mysqlrouter/
Filesystem: 700 Packages: 775
Warning: Inconsistent permissions on directory /var/log/mysqlrouter/
Filesystem: 750 Packages: 775I would like to know why this problem occurs when installing mysql, and what is the solution to this
Last edited by sss20081 (2022-07-10 05:32:55)
Offline
man pacman
pacman -Qk $package
Offline
man pacman
pacman -Qk $package
[1] 57272
[1] + 57272 suspended (tty output) sudo pacman -Qk
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)Offline
I use
pacman -Qkk mysqlThoroughly checked mysql
Then I got this
Warning: mysql: /run (permission mismatch)
Warning: mysql: /var/lib/mysqlrouter (user identifier UID mismatch)
Warning: mysql: /var/lib/mysqlrouter (user group identifier GID mismatch)
Warning: mysql: /var/lib/mysqlrouter (permission mismatch)
Warning: mysql: /var/log/mysqlrouter (user identifier UID mismatch)
Warning: mysql: /var/log/mysqlrouter (user group identifier GID mismatch)
Warning: mysql: /var/log/mysqlrouter (permission mismatch)
mysql: 326 all files, 3 changed filesI just want to know why this happens
Offline
There is no mysql package in the official repositories. You've either installed if from the AUR or from a third party repository. Alternatively, you're not running 64bit Archlinux. The correct replacement for mysql on Arch is mariadb.
Please clarify and post the output of uname -a.
Offline
Mod note: Moving to AUR issues.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
There is no mysql package in the official repositories. You've either installed if from the AUR or from a third party repository. Alternatively, you're not running 64bit Archlinux. The correct replacement for mysql on Arch is mariadb.
Please clarify and post the output of uname -a.
Linux Arch 5.18.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 02 Jul 2022 21:03:06 +0000 x86_64 GNU/LinuxI installed mysql from AUR
Offline
The inconsistencies detected are expected as the package uses tmpfiles.d to change ownership and permissions https://aur.archlinux.org/cgit/aur.git/ … ch?h=mysql
:: You need to initialize the MySQL data directory prior to starting
the service. This can be done with mysqld --initialize command, e.g.:
mysqld --initialize --user=mysql --basedir=/usr --datadir=/var/lib/mysqlDid you initialize the data directory before starting mysqld?
Offline
I initialized the data directory
Offline
I initialized the data directory
Was that before or after the output in the first post was produced? If after can you now run mysqld successfully?
If you still can not run mysqld successfully what is the exact command you are using and the full output it produces?
Offline
The inconsistencies detected are expected as the package uses tmpfiles.d to change ownership and permissions https://aur.archlinux.org/cgit/aur.git/ … ch?h=mysql
:: You need to initialize the MySQL data directory prior to starting the service. This can be done with mysqld --initialize command, e.g.: mysqld --initialize --user=mysql --basedir=/usr --datadir=/var/lib/mysqlDid you initialize the data directory before starting mysqld?
I think this worths a fix
Offline
I've got mysql running now, I just want to know why the install shows up:
Warning, inconsistency in directory permissions
This has never happened to me before
If you were wondering why your post disappeared, you hit the report link, not the reply link
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
I think this worths a fix
Stop packaging the directories and leave it to tmpfiles.d?
diff --git a/PKGBUILD b/PKGBUILD
index 04e514f..9f3228f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -226,6 +226,12 @@ package_mysql(){
# Cleanup
rmdir "${pkgdir}/usr/usr/lib"
rmdir "${pkgdir}/usr/usr"
+ rmdir "${pkgdir}/run"
+ rmdir "${pkgdir}/var/lib/mysqlrouter"
+ rmdir "${pkgdir}/var/lib"
+ rmdir "${pkgdir}/var/log/mysqlrouter"
+ rmdir "${pkgdir}/var/log"
+ rmdir "${pkgdir}/var"
# Arch Linux specific patches:
# * enable PrivateTmp for a little bit more securityEdit:
Remove /var as well. Only empty directory remaining /usr/lib/mysql/plugin/debug
Last edited by loqs (2022-07-08 00:58:23)
Offline
sorry i can't understand
Offline
loqs' comment was for Muflone, who maintains the mysql AUR.
But you could edit the PKGBUILD accordingly when building the mysql package.
Offline
and when I reinstall mysql
Warning: Inconsistent permissions on directory /run/ Filesystem: 755 Packages: 775 Warning: Inconsistent permissions on directory /var/lib/mysqlrouter/ Filesystem: 700 Packages: 775 Warning: Inconsistent permissions on directory /var/log/mysqlrouter/ Filesystem: 750 Packages: 775I would like to know why this problem occurs when installing mysql, and what is the solution to this
Simply the mysql package contains such directories and it assumes the permissions 775
In your system instead you have the permissions 700 or 750
For this reason pacman warns you the directories permissions differ.
This is a bug in mysql package (which I maintain) as I used two different permissions sets (755 for the packaged directories and 700/750 for the directories created by systemd-tmpfiles). I'll fix the package soon.
You can safely ignore the warning message, though.
Offline
Besides you being a legend for maintaining mysql on the AUR, is this the moment where we ask "why not mariadb"?
Offline
ok, thanks for your help
Offline