LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 06-27-2005, 05:42 PM   #1
goosie
Member
 
Registered: May 2005
Distribution: Mandrake Linux 10.0 Community
Posts: 44

Rep: Reputation: 15
MySQL startup error


When i type mysqld_safe & (using any user...) i get this error in my error logs...

050627 18:33:15 mysqld started
^G/usr/sbin/mysqld: Can't read dir of '/root/tmp/' (Errcode: 13)
050627 18:33:15 InnoDB: Operating system error number 13 in a file operation.
InnoDB: See http://www.innodb.com/ibman.html for installation help.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
050627 18:33:15 mysqld ended


and i tried changing the file permissions to 777 (i dont know much about chmod... kind of new to linux and i figured that made it readable, executable, and writable to everyone...) and it didnt work. anyone know how i can fix this?
 
Old 06-27-2005, 05:52 PM   #2
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
did you install a database using mysql_install_db (I think this is the command, but check to be sure)
 
Old 06-27-2005, 05:53 PM   #3
goosie
Member
 
Registered: May 2005
Distribution: Mandrake Linux 10.0 Community
Posts: 44

Original Poster
Rep: Reputation: 15
nope, i tried that and it wouldnt install so i installed it through urpmi
 
Old 06-27-2005, 06:12 PM   #4
goosie
Member
 
Registered: May 2005
Distribution: Mandrake Linux 10.0 Community
Posts: 44

Original Poster
Rep: Reputation: 15
oh yea, these are the files i have installed if that helps...

[root@localhost mysql]# rpm -qa | grep mysql
libmysql12-4.0.18-1mdk
mysqlcc-0.9.4-1mdk
[root@localhost mysql]# rpm -qa | grep MySQL
MySQL-common-4.0.18-1mdk
MySQL-4.0.18-1mdk
MySQL-client-4.0.18-1mdk
[root@localhost mysql]#
 
Old 06-27-2005, 07:04 PM   #5
goosie
Member
 
Registered: May 2005
Distribution: Mandrake Linux 10.0 Community
Posts: 44

Original Poster
Rep: Reputation: 15
Ok, i decided to try and re-install from the binary from the mysql.com website... and i get this error when trying to install it:

[root@localhost mysql]# scripts/mysql_install_db --user=mysql
Installing all prepared tables
./bin/mysqld: Can't read dir of '/root/tmp/' (Errcode: 13)
Fill help tables
./bin/mysqld: Can't read dir of '/root/tmp/' (Errcode: 13)

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h localhost password 'new-password'
See the manual for more instructions.

NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the ./bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the ./bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
[root@localhost mysql]#

and once again its a problem with reading the tmp dir... i checked to see if root owns that dir (i messed up ownership yesterday...) and it does... im so confused... im trying to learn to implement MySQL into c++ and without begin able to use mysql its kind of pointless..

EDIT:
sorry for posting so many times... i had just reolized stuff that could help someone help me and didnt think of using edit to post it until just now...

Last edited by goosie; 06-27-2005 at 07:36 PM.
 
Old 06-28-2005, 12:02 AM   #6
goosie
Member
 
Registered: May 2005
Distribution: Mandrake Linux 10.0 Community
Posts: 44

Original Poster
Rep: Reputation: 15
Ok, update on info... i uninstalled the urpmi and downloaded the rpm's from the mysql database and when installing that i get an error saying cant read '/root/tmp' too... so i guess the question has changed to how can i make it so the programs can read into that directory? ive searched for google for it and only things helpful i came up with are chmod, chroot, and chgrp and ive tried changing all 3 of those and none work...
 
Old 06-28-2005, 02:03 AM   #7
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
How did you use chown?

like this?

chown -R user:group folder

this is the correct way (above)
 
Old 06-28-2005, 03:51 PM   #8
goosie
Member
 
Registered: May 2005
Distribution: Mandrake Linux 10.0 Community
Posts: 44

Original Poster
Rep: Reputation: 15
::blink:: wow... i could have sworn i tried that... but figured id try it again and it worked... i got mysql installed! thanks a ton!
 
Old 06-28-2005, 03:56 PM   #9
goosie
Member
 
Registered: May 2005
Distribution: Mandrake Linux 10.0 Community
Posts: 44

Original Poster
Rep: Reputation: 15
scratch that... the MySQL server is still getting that error... the others installed cleanly, but the server is still acting up (im using the RPM's from the mysql.com website...)

EDIT:
tried restart, and tried it on a diffrent kernel, neither worked... why does MySQL have to be so difficult?! i would steal my moms CD tray (since mine is broken off...) and do a fresh install but that would lead to having to re-download a ton of stuff (and on a dailup connection... would take a few days non-stop to download it all...)


Last edited by goosie; 06-28-2005 at 06:21 PM.
 
Old 06-28-2005, 06:54 PM   #10
goosie
Member
 
Registered: May 2005
Distribution: Mandrake Linux 10.0 Community
Posts: 44

Original Poster
Rep: Reputation: 15
Or, since MySQL wount work if anyone has an alternitive for it (that works in a simular way) that i can use with c++ (im learning c++ while making a MUD -multi user dungeon- and was saving stuff in the MySQL database... so any alternatives to it?

EDIT:
although the alternative maybe wouldnt be the best idea since i am pretty new to C++ and it would probly take me close to forever to figure it out...

Last edited by goosie; 06-28-2005 at 06:58 PM.
 
Old 06-28-2005, 08:04 PM   #11
goosie
Member
 
Registered: May 2005
Distribution: Mandrake Linux 10.0 Community
Posts: 44

Original Poster
Rep: Reputation: 15
sorry for staying on this, but i really need it fixed... i reolized i didnt post the error i was getting while trying to run the RPM for the server...

[root@localhost root]# rpm -i MySQL-server-4.1.12-1.i386.rpm
warning: MySQL-server-4.1.12-1.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
050628 20:57:35 [Warning] Asked for 196608 thread stack, but got 126976
/usr/sbin/mysqld: Can't read dir of '/root/tmp/' (Errcode: 13)
050628 20:57:36 [Warning] Asked for 196608 thread stack, but got 126976
/usr/sbin/mysqld: Can't read dir of '/root/tmp/' (Errcode: 13)
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost password 'new-password'
See the manual for more instructions.

NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
Starting MySQL....................................[FAILED]

^thats the error i get... please help anyone...
 
Old 07-15-2005, 08:28 AM   #12
icray
LQ Newbie
 
Registered: Jul 2005
Posts: 1

Rep: Reputation: 0
Hi There,

Had the same problem now fixed. The problem appears to be the /root directory permission. The user mysql cannot access it let alone the /root/tmp. I did a chmod 777 /root and also chmod 777 /root/tmp. Install worked fine.

WARNING!? This sounds a bit unsafe to me but I am no expert so will try later to rescind those perms.....

Regards

Ian
 
Old 10-27-2005, 04:11 AM   #13
dalmassoc
LQ Newbie
 
Registered: Oct 2005
Location: france
Distribution: Fedora / Mandriva
Posts: 6

Rep: Reputation: 0
I think it is because your TMPDIR variable is set to /root/tmp
change to /tmp
and that do works

(mysqld is running with the mysql user which don't have permission on /root/tmp)

Last edited by dalmassoc; 11-16-2005 at 04:54 PM.
 
Old 11-16-2005, 03:30 PM   #14
steventux
LQ Newbie
 
Registered: Feb 2003
Location: London
Distribution: Mandriva 2007 Spring
Posts: 18

Rep: Reputation: 0
Thanks dalmassoc

# TMPDIR=/tmp

and the install script works a treat
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
SOLVED - mysql administrator startup error bking Linux - Software 0 02-10-2005 08:53 PM
MySql Thread error on startup Biggen Linux - Software 9 09-30-2004 08:05 AM
ALSA Startup error, MPlayer startup error, Sid andymadigan Debian 4 08-03-2004 04:15 PM


All times are GMT -5. The time now is 02:30 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration