LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 02-03-2004, 03:27 PM   #1
linuxnuby
LQ Newbie
 
Registered: Jan 2004
Posts: 4

Rep: Reputation: 0
Question MySQL on RH9 still giving problems even after permission changes


Hello all,

I'm trying to configure MySQL 5.0 on my RH9 box but still continue to run into problems even after the mysql user has been added and permissions have been granted to the /mysql/data directory.

This is what occurs when I try to start the MySQL daemon

[root@pclinux mysql]# ./bin/mysqld_safe &
[1] 6143
[root@pclinux mysql]# Starting mysqld daemon with databases from /root/mysql/data
040203 15:53:17 mysqld ended


[1]+ Done ./bin/mysqld_safe
[root@pclinux mysql]#

This is what I see in my error file:

040203 15:53:17 mysqld started
040203 15:53:17 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...
040203 15:53:17 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 43634.
InnoDB: Doing recovery: scanned up to log sequence number 0 43634
040203 15:53:17 InnoDB: Flushing modified pages from the buffer pool...
040203 15:53:17 InnoDB: Started; log sequence number 0 43634
040203 15:53:17 /root/mysql/bin/mysqld: Can't create/write to file '/root/mysql/data/pclinux.pid' (Errcode: 13)
040203 15:53:17 Fatal error: Can't open privilege tables: Can't open file: 'host.MYI' (errno: 13)
040203 15:53:17 /root/mysql/bin/mysqld: Error on delete of '/root/mysql/data/pclinux.pid' (Errcode: 13)
040203 15:53:17 mysqld ended

Now I'm assuming I had the correct permissions assigned for the user, mysql, for the data directory but I could be wrong. This is what appears when I list the permissions in the mysql directory.

[root@pclinux mysql]# ls -l
total 84
drwxr-xr-x 2 503 users 4096 Dec 22 12:01 bin
-rwxr-xr-x 1 503 users 801 Dec 22 12:00 configure
-rw-r--r-- 1 503 users 19106 Dec 22 11:47 COPYING
drwxr-x--- 4 mysql mysql 4096 Feb 3 15:40 data
drwxr-xr-x 2 503 users 4096 Dec 22 12:00 docs
drwxr-xr-x 2 503 users 4096 Dec 22 12:01 include
-rw-r--r-- 1 503 users 7400 Dec 22 11:47 INSTALL-BINARY
drwxr-xr-x 2 503 users 4096 Dec 22 12:01 lib
drwxr-xr-x 3 503 users 4096 Dec 22 12:00 man
drwxr-xr-x 6 503 users 4096 Dec 22 12:01 mysql-test
-rw-r--r-- 1 503 users 1937 Dec 21 13:01 README
drwxr-xr-x 2 503 users 4096 Dec 22 12:01 scripts
drwxr-xr-x 3 503 users 4096 Dec 22 12:00 share
drwxr-xr-x 5 503 users 4096 Dec 22 12:01 sql-bench
drwxr-xr-x 2 503 users 4096 Dec 22 12:01 support-files
drwxr-xr-x 2 503 users 4096 Dec 22 12:01 tests

This is correct right?

Any help would be greatly appreciated. Thanks in advance!

 
Old 02-03-2004, 04:43 PM   #2
YMHiK
LQ Newbie
 
Registered: Jan 2004
Distribution: Slackware 2.6.5, Slackware 2.6.4, RedHat 9 2.4.20-8
Posts: 23

Rep: Reputation: 15
You may need to specify a user for 'mysqld_safe' to run under. By default it runs main binary under 'mysql' user.
So in default way your mysql directory... with all mysql staff in it should belong to 'mysql' user, unless you run it under different user.
And maybe I don't get something, but how is that if you add a user to mysql db and you have to allow a 'system' user to own mysql files? Should it be the right of mysql db to manage user accounts withing mysql db? It is so in my MySQL 4 install...

If you want to make some user to access & write mysql files than you have to create a group and put both your new user and 'mysql' user in it and give that group access to particula directory while remaining files/directories will be reserved for mysql user.
Hm, should be all
 
Old 02-04-2004, 10:44 AM   #3
linuxnuby
LQ Newbie
 
Registered: Jan 2004
Posts: 4

Original Poster
Rep: Reputation: 0
YMHiK,

Thank you so much for your reply.

I installed the package under root and then changed the permissions for the /mysql/data driectory to be used by user, mysql. Are you saying when I run the MySQL daemon, I should specify it to run under the user, mysql? I'm assuming the way I'm running the daemon right now is under root.

Thanks again!
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
giving users permission to mount a CD ricardo_ok Slackware 4 11-03-2005 12:58 PM
Giving permission to /backup partition Micro420 Linux - Newbie 2 03-22-2004 06:08 PM
giving a user poweroff permission Goatdemon Slackware 7 07-19-2003 06:21 AM
giving users permission to mount dai Linux - General 2 08-02-2002 02:12 AM
MySQL Permission Problems bselzler Linux - Software 2 07-18-2001 08:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration