Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

How do I start mysql without having root privileges/write access to tool area ? I am getting following error

host13:~/JS> mysqld start
160706 18:06:31 [Warning] Can't create test file /tool/p64/.package/mysql-5.5.21/data/host13.lower-test
160706 18:06:31 [Warning] Can't create test file /tool/p64/.package/mysql-5.5.21/data/host13.lower-test
mysqld: Table 'mysql.plugin' doesn't exist
160706 18:06:31 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
160706 18:06:31 InnoDB: The InnoDB memory heap is disabled
160706 18:06:31 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160706 18:06:31 InnoDB: Compressed tables use zlib 1.2.3
160706 18:06:31 InnoDB: Initializing buffer pool, size = 128.0M
160706 18:06:31 InnoDB: Completed initialization of buffer pool
160706 18:06:31  InnoDB: Operating system error number 30 in a file operation.
InnoDB: Error number 30 means 'Read-only file system'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
265 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can move MySQL data directory to where you are able to write, and then specify it in /etc/my.cnf (or possibly another location depending on your system defaults), the parameter is datadir.

If your data directory has not yet been initialized (in which case mysqld will complain about missing privilege tables) you can create them like this:

mysql_install_db --datadir=$path_to_new_datadir

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...