LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   MySQL on RH9 still giving problems even after permission changes (https://www.linuxquestions.org/questions/linux-software-2/mysql-on-rh9-still-giving-problems-even-after-permission-changes-141908/)

linuxnuby 02-03-2004 03:27 PM

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!

:newbie:

YMHiK 02-03-2004 04:43 PM

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 :)

linuxnuby 02-04-2004 10:44 AM

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!


All times are GMT -5. The time now is 10:13 AM.