You are not logged in.
Pages: 1
The other day I wanted to check on Akonadi and noticed that my mysql daemon fails.
Checked everything.log but nothing.
Looked at the wiki and noticed I had no mysql directories in /var so I created them:
toad@deskarch 394\40 /var/run > lla|grep my
drwxr-xr-x 2 mysql mysql 4.0K 2009-12-12 15:59 mysqld
Apart from that I tried everything in the wiki but due to my ignorance of WTF it is all about I could not get it to work.
The only other vaguely useful (?) info I can give is:
sudo mysql -u root mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Any pointers, please?
Last edited by toad (2009-12-14 17:54:03)
never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::
Offline
i found the problem your experiencing here http://forums.fedoraforum.org/archive/i … 19402.html. what are the permissions to /var/lib/mysql? also, why are you using
sudo mysql -u root mysql
instead of
sudo mysql
or something similar?
Offline
Thanks Deuterium!
The link appears to be mainly about rights. As stated in post #1 rights should not be an issue. A further link in that link said that people hadn't started their daemon - well, I prolly forgot to say that
toad@deskarch 522\38 ~ > sudo /etc/rc.d/mysqld start
Password:
:: Starting MySQL [FAIL]
I wouldn't mind starting afresh with a reinstall but pacman won't let me remove mysql 'cos of dependencies. Should I attempt to force?
EDIT:
forget to say, I did mysql -p -u root 'cos it is in the wiki
Last edited by toad (2009-12-14 09:10:20)
never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::
Offline
ok, is it possible to get some verbose output? i dont have mysqld but from looking at the man page, it might be 'something' like
mysqld --verbose
Also, the log file of mysqld should be called host_name.log (where host_name is the hostname of your pc) and will probably be in /var/log and try looking for a mysql subdirectory. if you find the log file, it might help somebody deduce what the error was.
Offline
All top tips!
toad@deskarch 526\48 ~ > mysqld --verbose
091214 11:03:10 [Warning] Can't create test file /var/deskarch.lower-test
091214 11:03:10 [Warning] Can't create test file /var/deskarch.lower-test
091214 11:03:10 [Note] Plugin 'FEDERATED' is disabled.
091214 11:03:10 [Note] Plugin 'ndbcluster' is disabled.
mysqld: Table 'mysql.plugin' doesn't exist
091214 11:03:10 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
091214 11:03:10 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
Lines 1-2 (Can't create test file /var/deskarch.lower-test) - I am loathed to change the whole of var to mysql:mysql and do not see anything in /etc/mysql/my.conf to change this. See below:
toad@deskarch 536\69 /var/log > cat /etc/mysql/my.cnf|grep var
socket = /var/run/mysqld/mysqld.sock
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
# 2) Set the variables below. However, in case you choose this method, then
# change in this file to the variables' values below will be ignored and
#innodb_data_home_dir = /var/lib/mysql
#innodb_log_group_home_dir = /var/lib/mysql
#innodb_log_arch_dir = /var/lib/mysql
toad@deskarch 537\70 /var/log >
.
.
toad@deskarch 539\73 /var/log > lla /var/run/mysqld/
total 8.0K
drwxr-xr-x 2 mysql mysql 4.0K 2009-12-14 11:05 .
drwxr-xr-x 28 root root 4.0K 2009-12-14 07:40 ..
toad@deskarch 539\74 /var/log > lla /var/lib/|grep my
drwxr-xr-x 2 mysql mysql 4.0K 2009-12-14 11:05 mysql
toad@deskarch 539\75 /var/log >
Line 6 (Please run mysql_upgrade to create it.):
toad@deskarch 526\49 ~ > mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck with default connection arguments
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed
Your hint re the logs:
toad@deskarch 534\65 /var/log > ls
ConsoleKit auth.log crond.2 daemon.log.4 everything.log kdm.log mail.log messages.log.3 soundon.log user.log.2
Xorg.0.log auth.log.1 crond.3 dmesg.log everything.log.1 kernel.log mail.log.1 messages.log.4 syslog.log user.log.3
Xorg.0.log.old auth.log.2 crond.4 dspam everything.log.2 kernel.log.1 mail.log.2 mpd syslog.log.1 user.log.4
acpid.log auth.log.3 cups errors.log everything.log.3 kernel.log.2 mail.log.3 old syslog.log.2 wtmp
acpid.log.1 auth.log.4 daemon.log errors.log.1 everything.log.4 kernel.log.3 mail.log.4 pacman.log syslog.log.3 wtmp.1
acpid.log.2 btmp daemon.log.1 errors.log.2 faillog kernel.log.4 messages.log pm-powersave.log syslog.log.4
acpid.log.3 crond daemon.log.2 errors.log.3 gdm lastlog messages.log.1 pm-suspend.log user.log
acpid.log.4 crond.1 daemon.log.3 errors.log.4 interbench.loops_per_ms lpr.log messages.log.2 samba user.log.1
toad@deskarch 534\66 /var/log > cat everything.log|grep mys
toad@deskarch 535\67 /var/log >
Basically I cannot find a log
Okay, I checked /etc/group and found that no one belonged to mysql - added user mysql and myself. Am about to reboot (or is there a quicker way?), wish me luck
EDIT:
nope, will go through verbose et al again to see whether anything has changed...
Last edited by toad (2009-12-14 10:27:35)
never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::
Offline
some tips i got from here: http://www.linuxforums.org/forum/server … 002-a.html
try creating socket file. Here's some code:
touch /var/lib/mysql/mysql.sock
and if the /var/lib/mysql directory doesnt exist yet, use this command first:
mkdir /var/lib/mysql
also, make sure the mysql.sock file can be written to.
now try starting the daemon. If it didnt work, try starting the server first (just incase it isnt being started?)
safe_mysqld --user=mysql
#or
mysqld_safe --user=mysql
i got that command (above) from the url mentioned, and it looks like it needs the user mysql, so adding yourself to the mysql group seems like a good idea, let us know if it worked
Offline
I can't believe it!!!
I did a
sudo cp /etc/mysql/my.cnf /etc/my.cnf
and everything is working! Just looking in the wrong place all the time!
However, it does strike me as odd that this fact is not mentioned anywhere in the wiki or whatever. Will amend the former though to reflect this.
Who might have a say in where my.cnf file is located? Is it the arch package which puts it there by default? Is it worth telling the maintainer (Giovanni Scafora)?
never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::
Offline
was there a /etc/my.cnf file present before you copied it? maybe it was an incorrect configuration. im not too sure on who to notify if something is actually wrong with it, just do whatever you think is apropriate. btw, congratz on getting it working!
Offline
nope, there wasn't...
I put something in the wiki by way of suggestion. It may help others, it may not. I am not qualified to write authoritatively on the subject
never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::
Offline
I had a similar problem, and solved it by removing mysql and installing it again. I used a Chakra live CD. maybe that is why it was corrupt.
Offline
I had a similar problem, and solved it by removing mysql and installing it again. I used a Chakra live CD. maybe that is why it was corrupt.
You are rigth. That's why it happend to me. I fixed it just with a:
# pacman -Rd mysql
# pacman -Sy mysql
Offline
Pages: 1