You are not logged in.

#26 2009-03-01 22:41:39

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,230
Website

Re: mysql doesn't start

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)

Offline

#27 2009-03-02 15:45:31

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: mysql doesn't start

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.

Offline

#28 2009-03-03 08:14:57

dannytatom
Member
From: Seattle, WA
Registered: 2009-02-02
Posts: 229
Website

Re: mysql doesn't start

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. hmm


dnyy in IRC & Urban Terror

Offline

#29 2009-03-03 10:36:15

xelados
Member
Registered: 2007-06-02
Posts: 314
Website

Re: mysql doesn't start

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

#30 2009-03-04 15:30:20

stargeizer
Member
Registered: 2004-04-05
Posts: 8

Re: mysql doesn't start

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

#31 2009-03-04 18:25:23

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: mysql doesn't start

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)

Offline

#32 2009-03-04 19:14:52

ugkbunb
Member
Registered: 2009-02-26
Posts: 227

Re: mysql doesn't start

I am having the same issue. Nothing posted so far has worked for me.

Offline

#33 2009-03-04 19:33:05

RoseBud
Member
Registered: 2007-07-03
Posts: 6

Re: mysql doesn't start

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

#34 2009-03-04 21:11:55

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: mysql doesn't start

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.

Offline

#35 2009-03-04 21:29:30

ugkbunb
Member
Registered: 2009-02-26
Posts: 227

Re: mysql doesn't start

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

#36 2009-03-04 21:55:53

dannytatom
Member
From: Seattle, WA
Registered: 2009-02-02
Posts: 229
Website

Re: mysql doesn't start

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

#37 2009-03-04 22:03:12

ugkbunb
Member
Registered: 2009-02-26
Posts: 227

Re: mysql doesn't start

MYSQL.err wrote:

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

#38 2009-03-05 15:33:37

danthux
Member
From: Concepción, Chile
Registered: 2007-11-18
Posts: 12
Website

Re: mysql doesn't start

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

#39 2009-03-05 21:33:47

Echo
Member
From: Ohio, United States
Registered: 2006-05-16
Posts: 239

Re: mysql doesn't start

I notice the bug report (linked above) shows a status of "fixed"?

Anyway, I've downgraded for now.

Offline

#40 2009-03-06 19:51:25

Xiong Chiamiov
Member
From: central coast, california
Registered: 2008-06-18
Posts: 142
Website

Re: mysql doesn't start

Echo wrote:

I notice the bug report (linked above) shows a status of "fixed"?

That's because the original issue was.

danthux wrote:

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

#41 2009-03-07 04:44:28

jvalecillos
Member
Registered: 2009-02-25
Posts: 24

Re: mysql doesn't start

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? neutral

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

#42 2009-03-07 08:03:20

Xiong Chiamiov
Member
From: central coast, california
Registered: 2008-06-18
Posts: 142
Website

Re: mysql doesn't start

The removal of the .pid file worked fine for me, and is considerably less effort than your solution; does it work for you?

Offline

#43 2009-03-08 01:20:57

Echo
Member
From: Ohio, United States
Registered: 2006-05-16
Posts: 239

Re: mysql doesn't start

Xiong Chiamiov wrote:

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

#44 2009-03-30 16:59:00

alanhaggai
Member
From: World Wide Web
Registered: 2008-08-15
Posts: 25
Website

Re: mysql doesn't start

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

Board footer

Powered by FluxBB