You are not logged in.
Hi
If i try install mysql I get this errror:
chown: invalid user: 'mysql'
Cannot change ownership of the database directories to the 'mysql'
user. Check that you have the necessary permissions and try again.
error: command failed to execute correctly
Optional dependencies for mysql
perl-dbi
perl-dbd-mysql
Do i have to user called "mysql"? How can I install this package correctly?
Last edited by xorgx3 (2012-05-28 10:21:02)
Offline
Are you following the wiki instructions?
If so, where is this failure ocurring?
Offline
Error occurring during installation.This is full installation log:
[2012-05-26 07:06] Running 'pacman -S mysql'
[2012-05-26 07:06] chown: invalid user: 'mysql'
[2012-05-26 07:06] Cannot change ownership of the database directories to the 'mysql'
[2012-05-26 07:06] user. Check that you have the necessary permissions and try again.
[2012-05-26 07:06] installed mysql (5.5.24-1)
Although mysqld is installed i can't run daemon (still report fail).
Offline
Have you actually checked what it's complaining about (directory permissions)? The exact directories you should check are in the wiki article jasonwryan linked.
Burninate!
Offline
If i did
chmod 777 /var/lib/mysql
i had error :
warning: directory permissions differ on var/lib/mysql/
filesystem: 777 package: 700
If i changed permissions (chmod 700 /var/lib/mysql) package not report error, but mysql still not working.
For example:
# mysqladmin -u root password
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
httpd daemon is running at this time.
Offline
If your mysql daemon isn't running, then mysqladmin won't be able to establish a connection to it obviously.
What happens if you try to start the daemon after fixing the permissions (/etc/rc.d/mysqld start). Also check the mysql logs in /var/log should it fail.
Burninate!
Offline
chown: invalid user: 'mysql'
That's probably the problem.
Do you get this?
% grep mysql /etc/passwd
mysql:x:89:89::/var/lib/mysql:/bin/false
If not, try adding that line.
฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz
Offline
What happens if you try to start the daemon after fixing the permissions (/etc/rc.d/mysqld start). Also check the mysql logs in /var/log should it fail.
If I try running daemon after fixing permissions still I see
/etc/rc.d/mysqld start
:: Starting MySQL Server [BUSY]
[FAIL]
Do you get this?
% grep mysql /etc/passwd
mysql:x:89:89::/var/lib/mysql:/bin/false
If not, try adding that line.
Where I have to add that line?
grep not shows anything.
Last edited by xorgx3 (2012-05-26 14:43:33)
Offline
Well, mysql runs under the user called mysql. If it is not in /etc/passwd the user doesn't exist...
I had a quick look at the install script of mysql, it creates a group, a user and sets up mysql:
post_install(){
groupadd -g 89 mysql &>/dev/null
useradd -u 89 -g mysql -d /var/lib/mysql -s /bin/false mysql &>/dev/null
usr/bin/mysql_install_db --user=mysql --basedir=/usr
chown -R mysql:mysql var/lib/mysql &>/dev/null
}
I would suggest just removing the mysql package with pacman -Rnc mysql and installing it again to set it up properly...
฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz
Offline
OK I probably know where is the problem, I saw this just now. It isn't connected with mysql exactly.
So, if i try create new group/user or run new daemon I have to using full path (/usr/sbin/useradd instead of useradd, /etc/rc.d/somethin start instead of rc.d start something).
I think I have to fix this problem and later install mysql correctly.
So, somebody know how fix this?
Offline
echo $PATH
Offline
$ echo $PATH
/bin:/usr/bin:/usr/local/bin
What next? I have to change this path?
Offline
$ echo $PATH /bin:/usr/bin:/usr/local/bin
What next? I have to change this path?
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I still don't understand how fix them.
My /etc/profile:
# /etc/profile
#Set our umask
umask 022
# Set our default path
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
export PATH
# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
for profile in /etc/profile.d/*.sh; do
test -r "$profile" && . "$profile"
done
unset profile
fi
# Source global bash config
if test "$PS1" && test "$BASH" && test -r /etc/bash.bashrc; then
. /etc/bash.bashrc
fi
# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP
# Man is much better than us at figuring this out
unset MANPATH
I think /usr/sbin is my default path.
Offline
$ echo $PATH /bin:/usr/bin:/usr/local/bin
I think /usr/sbin is my default path.
How did you arrive at that conclusion.
If you look at what should be your $PATH in /etc/profile and look at what is your $PATH, you can see that you are missing the majority of it. Somewhere along the way (your shell initialization files, your login manager maybe) something is b0rked...
Offline
OK, so I think the easiest way would be remove this topic and start a new, because I don't know how fix it myself, and I hope someone else will help me.
Offline
For temporarily fixing your path, just run:
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
EDIT: typo
Last edited by Gcool (2012-05-28 08:37:08)
Burninate!
Offline
Do you use slim? If yes, what is the value of default_path in slim.conf?
Offline
Gcool - thanks for temporarily fixing, it works. But I need permanently fix
This topic is solved, I moved discuss here
Offline