
私は以下の順序を使用します:
[root@localhost /]# yum install -y mysql mysql-server mysql-devel
インストールしますmysql
。
インストール後、次のようにして mysql を起動します。
[root@localhost /]# /etc/init.d/mysqld start
-bash: /etc/init.d/mysqld: there is no file or directory
でも、この方法では始められないんです。
そこで、私は以下を使用します:
find / -name mysqld
mysqld を見つけるには、次のようにします。
[root@localhost /]# find / -name mysqld
/usr/libexec/mysqld
そこで、私は以下を使用します:
/usr/libexec/mysqld start
mysql を起動しようとしましたが、エラーが発生します:
[root@localhost /]# /usr/libexec/mysqld start
2017-05-19 14:28:17 139762539387072 [Warning] option 'open_files_limit': unsigned value 18446744073709551615 adjusted to 4294967295
2017-05-19 14:28:17 139762539387072 [Note] /usr/libexec/mysqld (mysqld 10.1.20-MariaDB) starting as process 82223 ...
2017-05-19 14:28:17 139762539387072 [Warning] Could not increase number of max_open_files to more than 1024 (request: 5035)
2017-05-19 14:28:17 139762539387072 [ERROR] WSREP: rsync SST method requires wsrep_cluster_address to be configured on startup.
そしてここで立ち往生する。
解決方法を誰か知っていますか?
答え1
CentOS 7 では、次のコマンドを使用します。
$ sudo systemctl start mysqld
起動時にmysqldを自動的に起動したい場合は、次のようにします。
$ sudo systemctl enable mysqld
編集: MySQLをインストールしたのに、MariaDBをインストールしようとしていませんか? MariaDBはCentOSのデフォルトのデータベースエンジンだと思います。実際にインストールされたかどうかは、
$ rpm -q mysqld
それ以外の場合は、指示に従うことをお勧めしますここ