f



mysqld Can't start server: can't create PID file: Permission denied

I am kind of stuck and not sure why I can't start the mysqld sever.
Here is my logs and folder permissions.

[root@dev me]# /usr/bin/mysqld_safe --user=mysql
Starting mysqld daemon with databases from /home/me/mysql/data
STOPPING server from pid file /home/me/mysql/data/dev.pid
071117 20:53:26  mysqld ended

/home/me/mysql/data/dev.err:

071117 20:53:26  mysqld started
071117 20:53:26 [ERROR] /usr/libexec/mysqld: Can't create/write to
file '/home/me/mysql/data/dev.pid' (Errcode: 13)
071117 20:53:26 [ERROR] Can't start server: can't create PID file:
Permission denied
071117 20:53:26  mysqld ended


[root@dev data]# ls -la /home/me|grep mysql
drwxrwxr-x  3 mysql mysql   4096 Nov 17 18:08 mysql

[root@dev mysql]# ls -l
total 4
drwxr-xr-x 2 mysql mysql 4096 Nov 17 20:56 data


[root@dev data]# ls -la
total 32
drwxr-xr-x 4 mysql mysql  4096 Nov 17 21:30 .
drwxrwxr-x 3 mysql mysql  4096 Nov 17 18:08 ..
-rw-rw---- 1 mysql root    792 Nov 17 21:29 dev.err
-rw-r----- 1 root  root  12288 Nov 17 20:58 .dev.err.swp
drwx------ 2 root  root   4096 Nov 17 21:28 mysql
drwx------ 2 root  root   4096 Nov 17 21:28 test

here is my /etc/my.cnf:

[client]
# password       = your_password
port            = 3306
socket          = /var/lib/mysql/mysql.sock

[mysqld]
basedir="/usr"
tmpdir="/tmp"
datadir="/home/me/mysql/data"

port            = 3306
socket          = /var/lib/mysql/mysql.sock

-1
crybaby
11/18/2007 2:51:29 AM
comp.databases.mysql 6944 articles. 1 followers. laredotornado (869) is leader. Post Follow

5 Replies
7093 Views

Similar Articles

[PageSpeed] 21

== Quote from crybaby (joemystery123@gmail.com)'s article
> I am kind of stuck and not sure why I can't start the mysqld
sever.
> Here is my logs and folder permissions.
> [root@dev me]# /usr/bin/mysqld_safe --user=mysql
> Starting mysqld daemon with databases from /home/me/mysql/data
> STOPPING server from pid file /home/me/mysql/data/dev.pid
> 071117 20:53:26  mysqld ended
> /home/me/mysql/data/dev.err:
> 071117 20:53:26  mysqld started
> 071117 20:53:26 [ERROR] /usr/libexec/mysqld: Can't create/write to
> file '/home/me/mysql/data/dev.pid' (Errcode: 13)
> 071117 20:53:26 [ERROR] Can't start server: can't create PID file:
> Permission denied
> 071117 20:53:26  mysqld ended
> [root@dev data]# ls -la /home/me|grep mysql
> drwxrwxr-x  3 mysql mysql   4096 Nov 17 18:08 mysql
> [root@dev mysql]# ls -l
> total 4
> drwxr-xr-x 2 mysql mysql 4096 Nov 17 20:56 data
> [root@dev data]# ls -la
> total 32
> drwxr-xr-x 4 mysql mysql  4096 Nov 17 21:30 .
> drwxrwxr-x 3 mysql mysql  4096 Nov 17 18:08 ..
> -rw-rw---- 1 mysql root    792 Nov 17 21:29 dev.err
> -rw-r----- 1 root  root  12288 Nov 17 20:58 .dev.err.swp
> drwx------ 2 root  root   4096 Nov 17 21:28 mysql
> drwx------ 2 root  root   4096 Nov 17 21:28 test
> here is my /etc/my.cnf:
> [client]
> # password       = your_password
> port            = 3306
> socket          = /var/lib/mysql/mysql.sock
> [mysqld]
> basedir="/usr"
> tmpdir="/tmp"
> datadir="/home/me/mysql/data"
> port            = 3306
> socket          = /var/lib/mysql/mysql.sock


this is a permissions issue! make mysql user and group the owner of
mysql direcotry. start the server again and you should be fine.
--
POST BY: lark with PHP News Reader ;o)
1
lark
11/18/2007 6:27:01 PM
>
> this is a permissions issue! make mysql user and group the owner of
> mysql direcotry. start the server again and you should be fine.

I have given mysql folder in /home/me rwx for both mysql user and
mysql group.

mysql folder in /home/me:
drwxrwxr-x  3 mysql mysql   4096 Nov 17 18:08 mysql

Not sure why this error message:

content of home/me/mysql/data/dev.err:

071117 20:53:26  mysqld started
071117 20:53:26 [ERROR] /usr/libexec/mysqld: Can't create/write to
file '/home/me/mysql/data/dev.pid' (Errcode: 13)
071117 20:53:26 [ERROR] Can't start server: can't create PID file:
Permission denied
071117 20:53:26  mysqld ended

Permissions look good on the folder mysql for user=mysql and
group=mysql.  I am not sure why I am keep getting this error.  Can
someone give me an insight?
1
crybaby
11/19/2007 1:51:41 PM
Does anyone know how to drop constarints from all the table of a
databse .. i am using hibernate with Mysql..evertime I run my programm
the constraints gets added

...& i need to remove them manully going to each table..to insert data
into tables quickly..

please do let me know if any one know who to drop constrains at once
from all the tables in a database?

Thanks
Ashwini




On Nov 19, 5:51 am, crybaby <joemystery...@gmail.com> wrote:
> > this is a permissions issue! makemysqluser andgroupthe owner of
> >mysqldirecotry. start the server again and you should be fine.
>
> I have givenmysqlfolder in /home/me rwx for bothmysqluser andmysqlgroup.
>
> mysqlfolder in /home/me:
> drwxrwxr-x  3mysqlmysql  4096 Nov 17 18:08mysql
>
> Not sure why this error message:
>
> content of home/me/mysql/data/dev.err:
>
> 071117 20:53:26  mysqld started
> 071117 20:53:26 [ERROR] /usr/libexec/mysqld: Can't create/write to
> file '/home/me/mysql/data/dev.pid' (Errcode: 13)
> 071117 20:53:26 [ERROR] Can't start server: can't create PID file:
> Permission denied
> 071117 20:53:26  mysqld ended
>
> Permissions look good on the foldermysqlfor user=mysqlandgroup=mysql.  I am not sure why I am keep getting this error.  Can
> someone give me an insight?

0
Bhingare
11/19/2007 6:57:39 PM
On Mon, 19 Nov 2007 19:57:39 +0100, Bhingare, Ashwini  
<ashwinibhingare@gmail.com> wrote:
> Does anyone know how to drop constarints....

Please don't hijack totally unrelated threads of others. It makes me  
regret I even answered you.
-- 
Rik Wasmus
0
Rik
11/19/2007 7:12:03 PM
In article <4a053cdf-4cef-4f65-8585-79c377c9506a@w34g2000hsg.googlegroups.com>,
crybaby  <joemystery123@gmail.com> wrote:
>
>>
>> this is a permissions issue! make mysql user and group the owner of
>> mysql direcotry. start the server again and you should be fine.
>
>I have given mysql folder in /home/me rwx for both mysql user and
>mysql group.
>
>mysql folder in /home/me:
>drwxrwxr-x  3 mysql mysql   4096 Nov 17 18:08 mysql
>
>Not sure why this error message:
>
>content of home/me/mysql/data/dev.err:

Now, what are the permissions on the data directory (it needs to
exist) and the dev.err file (if it exists, but it's OK if it doesn't)?

For this to work, you need (for user mysql, either by user or group
permissions):

	At least x permission on /
	At least x permission on /home
	At least x permission on /home/me
	At least x permission on /home/me/mysql
	At least wx permission on /home/me/mysql/data if you're going to
		create or delete files there.
	At least w permission on /home/me/mysql/data/dev.err if it exists
		and you're going to open it for write.


>071117 20:53:26  mysqld started
>071117 20:53:26 [ERROR] /usr/libexec/mysqld: Can't create/write to
>file '/home/me/mysql/data/dev.pid' (Errcode: 13)
>071117 20:53:26 [ERROR] Can't start server: can't create PID file:
>Permission denied
>071117 20:53:26  mysqld ended
>
>Permissions look good on the folder mysql for user=mysql and
>group=mysql.  I am not sure why I am keep getting this error.  Can
>someone give me an insight?

Now, how about the *data* directory?



0
gordonb
11/20/2007 3:38:23 AM
Reply: