fosiul01
asked on
visudo for mysql services
HI
I know how to use visudo ... but dont understand how to add command to start multi_mysqld properly
example :
# User alias specification
User_Alias ADMINS = support
# Cmnd alias specification
Cmnd_Alias MYSQL = /etc/init.d/mysql
Cmnd_Alias MYSQLD = /usr/bin/mysqld_multi
Cmnd_Alias MYSQLD_SAFE = /usr/bin/mysqld_safe,/bin/ open
# User privilege specification
root ALL=(ALL) ALL
ADMINS ALL = NOPASSWD:MYSQL
ADMINS ALL = NOPASSWD:MYSQLD
ADMINS ALL = NOPASSWD:MYSQLD_SAFE
now problem is :
shutting down is fine
example
myqld_multi stop : works fine..
but mysqld_multi start : it will about to start then will fail
now i have added mysqld_safe command as you can see.. but still it will not allow to start the database as it does not h ave the proper access right.
but "mysqld_multi stop" works fine ..
if any body done it before .. please advise me ..
note : as root user mysqld_multi start works perfect .
thanks
I know how to use visudo ... but dont understand how to add command to start multi_mysqld properly
example :
# User alias specification
User_Alias ADMINS = support
# Cmnd alias specification
Cmnd_Alias MYSQL = /etc/init.d/mysql
Cmnd_Alias MYSQLD = /usr/bin/mysqld_multi
Cmnd_Alias MYSQLD_SAFE = /usr/bin/mysqld_safe,/bin/
# User privilege specification
root ALL=(ALL) ALL
ADMINS ALL = NOPASSWD:MYSQL
ADMINS ALL = NOPASSWD:MYSQLD
ADMINS ALL = NOPASSWD:MYSQLD_SAFE
now problem is :
shutting down is fine
example
myqld_multi stop : works fine..
but mysqld_multi start : it will about to start then will fail
now i have added mysqld_safe command as you can see.. but still it will not allow to start the database as it does not h ave the proper access right.
but "mysqld_multi stop" works fine ..
if any body done it before .. please advise me ..
note : as root user mysqld_multi start works perfect .
thanks
Sep 16 10:51:54 mfdb mysqld_safe: Starting mysqld daemon with databases from /db/data1
Sep 16 10:51:54 mfdb mysqld_safe: Starting mysqld daemon with databases from /db/data2
Sep 16 10:51:54 mfdb mysqld_safe: Starting mysqld daemon with databases from /db/data3
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 [Warning] Can't create test file /db/data1/mfdb.lower-test
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 [Warning] Can't create test file /db/data1/mfdb.lower-test
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 [Warning] One can only use the --user switch if running as root
Sep 16 10:51:54 mfdb mysqld:
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 [Warning] Can't create test file /db/data2/mfdb.lower-test
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 [Warning] Can't create test file /db/data2/mfdb.lower-test
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 [Warning] One can only use the --user switch if running as root
Sep 16 10:51:54 mfdb mysqld:
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 [Note] Plugin 'FEDERATED' is disabled.
Sep 16 10:51:54 mfdb mysqld: #007/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 [Note] Plugin 'FEDERATED' is disabled.
Sep 16 10:51:54 mfdb mysqld: #007/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 [Warning] Can't create test file /db/data3/mfdb.lower-test
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 [Warning] Can't create test file /db/data3/mfdb.lower-test
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 [Warning] One can only use the --user switch if running as root
Sep 16 10:51:54 mfdb mysqld:
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 [Note] Plugin 'FEDERATED' is disabled.
Sep 16 10:51:54 mfdb mysqld: #007/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 InnoDB: Operating system error number 13 in a file operation.
Sep 16 10:51:54 mfdb mysqld: InnoDB: The error means mysqld does not have the access rights to
Sep 16 10:51:54 mfdb mysqld: InnoDB: the directory.
Sep 16 10:51:54 mfdb mysqld: InnoDB: File name ./ibdata1
Sep 16 10:51:54 mfdb mysqld: InnoDB: File operation call: 'open'.
Sep 16 10:51:54 mfdb mysqld: InnoDB: Cannot continue operation.
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 InnoDB: Operating system error number 13 in a file operation.
Sep 16 10:51:54 mfdb mysqld: InnoDB: The error means mysqld does not have the access rights to
Sep 16 10:51:54 mfdb mysqld: InnoDB: the directory.
Sep 16 10:51:54 mfdb mysqld: InnoDB: File name ./ibdata1
Sep 16 10:51:54 mfdb mysqld: InnoDB: File operation call: 'open'.
Sep 16 10:51:54 mfdb mysqld: InnoDB: Cannot continue operation.
Sep 16 10:51:54 mfdb mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld2.pid ended
Sep 16 10:51:54 mfdb mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld1.pid ended
Sep 16 10:51:54 mfdb mysqld: 110916 10:51:54 InnoDB: Operating system error number 13 in a file operation.
Sep 16 10:51:54 mfdb mysqld: InnoDB: The error means mysqld does not have the access rights to
Sep 16 10:51:54 mfdb mysqld: InnoDB: the directory.
Sep 16 10:51:54 mfdb mysqld: InnoDB: File name ./ibdata1
Sep 16 10:51:54 mfdb mysqld: InnoDB: File operation call: 'open'.
Sep 16 10:51:54 mfdb mysqld: InnoDB: Cannot continue operation.
Sep 16 10:51:54 mfdb mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld3.pid ended
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
my fault
i was not typing sudo infront of the command
works perfectly
sudo /usr/bin/mysqld_multi start
thanks for point me out ..