Results 1 to 4 of 4
Hello - this year's project is to learn about MySQL, Apache and PHP and to get them working together to produce web databases.
I've got a copy of a book ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-05-2007 #1
MySQL: problems starting it
Hello - this year's project is to learn about MySQL, Apache and PHP and to get them working together to produce web databases.
I've got a copy of a book by O'Reilly which suggests I should compile MySQL from source. This makes sense when trying to get it working with PHP because you then get all the mysql_config files in the right places for PHP to compile against.
My problem isn't compiling MySQL: that went well; it's getting it to start. A lot of people seem to have this problem.
I have an error code 13, and Googling won't turn up an answer. It seems to be a problem with mysqld accessing directories. I've tried every combination of chown I can think of. I've copied the MySQL config file (called my.cnf) into /etc . My error message looks like this:
Any clues? I'm using MySQL ver. 4.1.x Version 5.x.x probably has more than I need. In fact I just need to get a working LAMP system to play around with. The annoying thing is that no matter how many combinations of permissions I try (as root) the database still can't start.Code:070305 11:43:41 mysqld started /usr/local/mysql/libexec/mysqld: Can't read dir of '/root/tmp/' (Errcode: 13) /usr/local/mysql/libexec/mysqld: Can't create/write to file '/root/tmp/ibGsqDEW' (Errcode: 13) 070305 11:43:41 InnoDB: Error: unable to create temporary file; errno: 13 070305 11:43:41 [ERROR] Can't init databases 070305 11:43:41 [ERROR] Aborting 070305 11:43:41 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete 070305 11:43:41 mysqld ended
If I install MySQL as an rpm I can start it from Mandriva's front-end ... but then I can't easily get PHP working with it.I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso
- 03-05-2007 #2
Solved!
No worries. This looked impossible but this page gave me the answer (at the bottom under 'Quick FAQ').
The solution: as root do export TMPDIR=/tmp then run ./mysqld_safe --user=mysql &
Without Google I wouldn't have had a chance to sort this out. It seems that when you compile from source, environment variables aren't set up correctly. The error messages are slightly misleading!I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso
- 03-05-2007 #3
That problem seems to only happen on Mandriva because the use a seperate tmp directory for each user. Another way to resolve the issue is to edit my.cnf and make sure that the temp directory is set to /tmp.
- 03-05-2007 #4Thanks. Yes, I wondered if it was just a Mandriva thing; the directory tree is a bit different perhaps. What's confusing is that there's a directory called /root/tmp which MySQL says it can't access. So you think, 'Why not? It knows the path to the directory'.
Originally Posted by daark.child
I found plenty of posts about the problem on other forums. A lot of these were very long, very articulate and completely wrong!
Many of them hadn't been resolved because they only focused on the chown and chmod commands.
I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso


Reply With Quote
