You are not logged in.
I'm having trouble with 5.0.77-1 too.
After a reboot, mysql failed to start until I removed /srv/mysql/<hostname>.pid
(non-standard data directory)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
interesting...
sudo rm /var/lib/mysql/*
sudo pacman -S mysql
this left the data directories b/c i forgot the -r option, but clearing out the regular files and reinstalling seems to have done the trick. we'll see what happens after a reboot this time.
//github/
Offline
I'm having the same problem, same version (5.0.77).
sudo rm /var/lib/mysql/*
sudo pacman -S mysql
^ didn't fix it here, though.
dnyy in IRC & Urban Terror
Offline
I'm also having problems with the same version. If this keeps up I may just ditch MySQL in favor of something more stable and simple.
Offline
This solved the problem for me... don't know if it can resolve the problem for everyone but at least is possible that can work...
edit your my.cnf and add or uncoment the following line:
[mysql]
#no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
safe-updates
In the provided my.cnf by default, the directive safe-updates comes commented. Uncoment it, search for any *.pid in /var/lib/mysql/ and delete it, and then do a
/etc/rc.d/mysqld start
It should start the database correctly.
After it i recommend to run:
mysqlcheck -A -u root -p
(and insert yout mysql root password)
to check your databases. If any of your databases are not OK, then you have to repair it.
it can be done with:
mysqlcheck -A --auto-repair -u root -p
(and enter your mysql root password)...
The above can repair most of damages that can be produced due to various things... sometimes an update can backfire at you when using mysql... PostgreSQL is more solid, but is somewhat obtuse.
Hope it helps, and sorry about my english... not my native language
Regards.
J.
Offline
boo, i had it working. i decided to uncomment safe-updates and now it fails. should've left it as is. reverting the changes, removing /var/lib/mysql/*, reinstalling; nothing seems to fix it now. this is bothersome.
moreover, my pacman.log seems to have weird information. it contains an upgrade from 77-1 to 75-4 (?) then back to 77-1; then each time i've rebooted since then i have an extra pacman upgrade entry:
edit scratch that, i purposely downgraded looking for a fix, then re upgraded when it was still failing, i still dont understand entries on each reboot.
cat /var/log/pacman.log | grep mysql
--snip--
[2009-02-28 18:22] upgraded mysql (5.0.77-1 -> 5.0.75-4)
[2009-02-28 18:23] upgraded mysql (5.0.75-4 -> 5.0.77-1)
[2009-03-02 10:42] upgraded mysql (5.0.77-1 -> 5.0.77-1)
[2009-03-04 13:06] upgraded mysql (5.0.77-1 -> 5.0.77-1)
--/snip--
is that normal?
Last edited by brisbin33 (2009-03-04 18:26:13)
//github/
Offline
I am having the same issue. Nothing posted so far has worked for me.
Offline
I was also having the same problem with the latest package for mysql (5.0.77-1). I found a file in my /var/lib/mysql/ directory called [myServerName].err that said the following:
090304 15:45:37 mysqld started
090304 15:45:38 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
090304 15:45:38 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
090304 15:45:39 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.
090304 15:45:39 mysqld ended
090304 15:46:43 mysqld ended
To fix this, I simply changed the owner and group of the /var/lib/mysql/ folder to mysql and then tried to start the server again with the following commands:
chown -R mysql.mysql /var/lib/mysql
/etc/rc.d/mysqld start
This seemed to fix the problem I was having. Hopefully it will help in the other cases as well.
Offline
false alarm for me.
note: if you rm [host].pid _before_ stopping the daemon, rc.d/mysqld stop doesn't work (b/c it doesn't know what pid to kill) and rc.d/mysqld start fails b/c your existing daemon is still bound on 3306.
in this scenario, i just had to sudo pkill mysqld then rc.d/mysqld start to get me running again. *facepalm*
order matters with these fixes.
//github/
Offline
ugh, still no luck here... I have tried recursively removing all mysql folder + the database (I only had a amarok database that I can easily rebuild.) Permissions on /var/lib/mysql are fine.... There is no daemon running so pkill/killall mysql doesn't seem to be the solution for me.
Offline
After a reboot, mine worked. But after rebooting a second time, it's broke again.
Edit: Nevermind, after restarting it a few times it starts now.
Last edited by dannytatom (2009-03-04 21:57:13)
dnyy in IRC & Urban Terror
Offline
090304 16:02:20 mysqld started
InnoDB: Log scan progressed past the checkpoint lsn 0 36808
090304 16:02:20 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 0 43655
090304 16:02:20 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
090304 16:02:20 InnoDB: Started; log sequence number 0 43655
090304 16:02:20 [Note] Recovering after a crash using mysql-bin
090304 16:02:20 [Note] Starting crash recovery...
090304 16:02:20 [Note] Crash recovery finished.
090304 16:02:21 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
090304 16:02:21 mysqld ended
EDIT: chalk this one up to stupidity I think I need to just run mysql_install_db
yup... running mysql_install_db then chown to mysql.mysql fixed my issue... finally got the daemon up and running again
Last edited by ugkbunb (2009-03-04 22:12:22)
Offline
if you can't start with "/etc/rc.d/mysqld start" and exist "/var/lib/mysql/<hostname>.pid" then "rm <hostname>.pid" and do "/etc/rc.d/mysqld restart". the problem seems to happen when mysqld doesn't properly stop (like in system crash or something)
Business model FTW: Free2Play GNU/Affero GPL MMORPG Ryzom (more info)
Offline
I notice the bug report (linked above) shows a status of "fixed"?
Anyway, I've downgraded for now.
Offline
I notice the bug report (linked above) shows a status of "fixed"?
That's because the original issue was.
if you can't start with "/etc/rc.d/mysqld start" and exist "/var/lib/mysql/<hostname>.pid" then "rm <hostname>.pid" and do "/etc/rc.d/mysqld restart". the problem seems to happen when mysqld doesn't properly stop (like in system crash or something)
Ah, I was wondering why I was having problems when I hadn't upgraded mysql recently. I booted into KDE to see how it looks, did some screwy stuff and ended up hard-rebooting, then noticed amarok wouldn't work any more. Boo.
I'm reopening the bug report, since there is still a lingering issue, albeit one that only happens when the system shuts down improperly.
Offline
I have the same problem too. It seems to happen when the system is shuting down and don't stop the process properly.
My solution:
1. Uninstall mysql package
sudo pacman -R mysql
2. Delete the complete /var/lib/mysql directory, how you do a backup anyway?
sudo rm -R /var/lib/mysql directory
3. Then delete my.cnf.pacsave and mysqld.pacsave
sudo rm /etc/my.cnf.pacsave
sudo rm /etc/conf.d/mysqld.pacsave
4. Install mysql again
sudo pacman -S mysql
5. Run and stop mysqld manually for now
sudo /etc/rc.d/mysqld start
sudo /etc/rc.d/mysqld stop
It's a bad solution, I know, but it's a temporary workaround, especially if you are developing a program
Last edited by jvalecillos (2009-03-07 04:46:39)
Offline
The removal of the .pid file worked fine for me, and is considerably less effort than your solution; does it work for you?
Offline
I'm reopening the bug report, since there is still a lingering issue, albeit one that only happens when the system shuts down improperly.
I see it's open again, thanks for that...
Offline
Check the permissions of /var/lib/mysql/ and within. Mine was all root owned. I had to chown them to mysql. Working fine now.
The difference makes the difference.
Offline