0
MySQL 5.7をroot権限のないredhatサーバにインストールしようとしました。私はソースコードをダウンロードし、コンパイルしてスムーズにインストールしました。しかし、mysqldを実行すると常にエラーが出ます。管理者権限のないLinuxでmysqlサーバをインストール
私は http://www.martijn-onderwater.nl/2010/11/23/installing-mysql-on-linux-without-root-privileges/
上の指示に従って、私は./bin/mysqld --defaults-ファイル=のmy.cnf --initializeを実行したときに、私は
[mysqld]
port=3306
socket=/afs/crc.nd.edu/user/j/jlai1/MySQL/thesock
basedir=/afs/crc.nd.edu/user/j/jlai1/MySQL
datadir=data
pid-file=$HOME/MySQL/mysql.pid
user=root
[client]
port=3306
socket=$MySQL_HOME/thesock
user=root
[mysqladmin]
socket=$MySQL_HOME/thesock
user=root
のmy.cnfファイルを作成、それは正常に動作します。しかし、私はこの問題は、ユーザーがMySQL用の特別ポート、3306をバインドする権限を持っていけないと思われ、次の問題に
./bin/mysqld --defaults-file=my.cnf
2017-02-24T16:04:40.098102Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-02-24T16:04:40.098259Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2017-02-24T16:04:40.098302Z 0 [Note] ./bin/mysqld (mysqld 5.7.17) starting as process 1786 ...
2017-02-24T16:04:40.103470Z 0 [Warning] One can only use the --user switch if running as root
2017-02-24T16:04:40.105092Z 0 [Note] InnoDB: PUNCH HOLE support available
2017-02-24T16:04:40.105121Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-02-24T16:04:40.105128Z 0 [Note] InnoDB: Uses event mutexes
2017-02-24T16:04:40.105137Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-02-24T16:04:40.105143Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-02-24T16:04:40.105466Z 0 [Note] InnoDB: Number of pools: 1
2017-02-24T16:04:40.105593Z 0 [Note] InnoDB: Using CPU crc32 instructions
2017-02-24T16:04:40.106782Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-02-24T16:04:40.115005Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-02-24T16:04:40.117871Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2017-02-24T16:04:40.133076Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2017-02-24T16:04:40.150182Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2017-02-24T16:04:40.150804Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2017-02-24T16:04:40.279174Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2017-02-24T16:04:40.280871Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2017-02-24T16:04:40.280904Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2017-02-24T16:04:40.281963Z 0 [Note] InnoDB: Waiting for purge to start
2017-02-24T16:04:40.332115Z 0 [Note] InnoDB: 5.7.17 started; log sequence number 2534599
2017-02-24T16:04:40.332297Z 0 [Note] InnoDB: Loading buffer pool(s) from /afs/crc.nd.edu/user/j/jlai1/MySQL/data/ib_buffer_pool
2017-02-24T16:04:40.332547Z 0 [Note] Plugin 'FEDERATED' is disabled.
2017-02-24T16:04:40.337533Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170224 11:04:40
2017-02-24T16:04:40.340352Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2017-02-24T16:04:40.340424Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2017-02-24T16:04:40.342270Z 0 [Note] IPv6 is not available.
2017-02-24T16:04:40.342313Z 0 [Note] - '0.0.0.0' resolves to '0.0.0.0';
2017-02-24T16:04:40.342355Z 0 [Note] Server socket created on IP: '0.0.0.0'.
2017-02-24T16:04:40.344528Z 0 [ERROR] Can't start server : Bind on unix socket: Operation not permitted
2017-02-24T16:04:40.344546Z 0 [ERROR] Do you already have another mysqld server running on socket: /afs/crc.nd.edu/user/j/jlai1/MySQL/thesock ?
2017-02-24T16:04:40.344563Z 0 [ERROR] Aborting
2017-02-24T16:04:40.344584Z 0 [Note] Binlog end
2017-02-24T16:04:40.344674Z 0 [Note] Shutting down plugin 'ngram'
2017-02-24T16:04:40.344686Z 0 [Note] Shutting down plugin 'partition'
2017-02-24T16:04:40.344692Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2017-02-24T16:04:40.344699Z 0 [Note] Shutting down plugin 'ARCHIVE'
2017-02-24T16:04:40.344704Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2017-02-24T16:04:40.344805Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2017-02-24T16:04:40.344813Z 0 [Note] Shutting down plugin 'MyISAM'
2017-02-24T16:04:40.344830Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2017-02-24T16:04:40.344835Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2017-02-24T16:04:40.344840Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2017-02-24T16:04:40.344844Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2017-02-24T16:04:40.344849Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2017-02-24T16:04:40.344853Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2017-02-24T16:04:40.344858Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2017-02-24T16:04:40.344862Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2017-02-24T16:04:40.344866Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2017-02-24T16:04:40.344871Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2017-02-24T16:04:40.344875Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2017-02-24T16:04:40.344880Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2017-02-24T16:04:40.344895Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2017-02-24T16:04:40.344899Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2017-02-24T16:04:40.344904Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2017-02-24T16:04:40.344908Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2017-02-24T16:04:40.344913Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2017-02-24T16:04:40.344917Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2017-02-24T16:04:40.344921Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2017-02-24T16:04:40.344926Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2017-02-24T16:04:40.344932Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2017-02-24T16:04:40.344936Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2017-02-24T16:04:40.344941Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2017-02-24T16:04:40.344946Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2017-02-24T16:04:40.344951Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2017-02-24T16:04:40.344955Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2017-02-24T16:04:40.344960Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2017-02-24T16:04:40.344964Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2017-02-24T16:04:40.344969Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2017-02-24T16:04:40.344973Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2017-02-24T16:04:40.344978Z 0 [Note] Shutting down plugin 'InnoDB'
2017-02-24T16:04:40.345065Z 0 [Note] InnoDB: FTS optimize thread exiting.
2017-02-24T16:04:40.345135Z 0 [Note] InnoDB: Starting shutdown...
2017-02-24T16:04:40.445348Z 0 [Note] InnoDB: Dumping buffer pool(s) to /afs/crc.nd.edu/user/j/jlai1/MySQL/data/ib_buffer_pool
2017-02-24T16:04:40.447661Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 170224 11:04:40
2017-02-24T16:04:41.779942Z 0 [Note] InnoDB: Shutdown completed; log sequence number 2534618
2017-02-24T16:04:41.795993Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2017-02-24T16:04:41.796030Z 0 [Note] Shutting down plugin 'MEMORY'
2017-02-24T16:04:41.796045Z 0 [Note] Shutting down plugin 'CSV'
2017-02-24T16:04:41.796092Z 0 [Note] Shutting down plugin 'sha256_password'
2017-02-24T16:04:41.796105Z 0 [Note] Shutting down plugin 'mysql_native_password'
2017-02-24T16:04:41.796375Z 0 [Note] Shutting down plugin 'binlog'
2017-02-24T16:04:41.796973Z 0 [Note] ./bin/mysqld: Shutdown complete
そして解決策は、 'sudo'によって特権ユーザーとしてMySQLを起動することです。 – ceejayoz
私がこの質問で触れたように、私はHPCにroot権限を持っていません。問題を回避する方法はありますか?あるいは、root権限を持たないMySQLの動作をどうすればいいのですか? –