Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permissions issue

Status
Not open for further replies.

danno74

IS-IT--Management
Nov 13, 2002
295
US
Greetings,

I have a test server setup with Solaris 10. I have been trying unsuccessfully to install mysql on it. Here is where I'm at, if you can offer me some guidance I would appreciate it. It seems like something simple but I can't figure it out.

I try this to start the service:

> bin/mysqld_safe --user=mysql &

Get this:

[1] 972
mysql > Starting mysqld daemon with databases from /usr/local/mysql-5.0.51a-solaris10-sparc-64bit/data
STOPPING server from pid file /usr/local/mysql-5.0.51a-solaris10-sparc-64bit/data/server.pid
080215 15:30:09 mysqld ended


I checked the err log:

080215 15:30:08 mysqld started
InnoDB: Log scan progressed past the checkpoint lsn 0 36808
080215 15:30:08 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
080215 15:30:08 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
080215 15:30:09 InnoDB: Started; log sequence number 0 43655
080215 15:30:09 [ERROR] /usr/local/mysql-5.0.51a-solaris10-sparc-64bit/bin/mysqld: Can't create/write to file '/usr/local/mysql-5.0.51a-solaris10-sparc-64bit/data/server.pid' (Errcode: 13)
080215 15:30:09 [ERROR] Can't start server: can't create PID file: Permission denied
080215 15:30:09 mysqld ended


Of course, this looks like a file permission problem. Here is the permission on the folder:

drwxrwxrwx 4 mysql mysql 512 Feb 15 15:34 data

Not sure what else to do. Appreciate you looking at it for me.

- Dan
 
The directory permissions look fine. If you su to the mysql user, can you actually cd into that directory? It may be that there is a directory further up the tree with more restrictive permissions.

Also, is there an existing server.pid file in that directory owned by another user?

Annihilannic.
 
My sys admin helped me out:

1) Permissions on /usr/local were set to 700, so mysql could not create files below that point. I changed the permissions of this directory to 755

2) the account mysql had an invalid home directory, so I changed it to /usr/local/mysql

3) The files in /usr/local/mysql/data/mysql were owned by root, not mysql. I modified the ownership of these files to be owned by mysql.


I can get the service to start now, but I cannot set the root password:

wimpy - dlaird - mysql > ./bin/mysqladmin -u root password xxxxxxx
./bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'


This security stuff is confusing the heck out of me....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top