まとまりのないブログ

something which something is something

mysql

mariadbのポートを変更する

投稿日:

mariadbのコンフィグファイルであるmy.cnfにポートの設定を追加する。mysqldセクションとportを下記のように追加して再起動する。そしてmysqlにログインして show variables like ‘port’; を実行して反映されているか確認。

# nano /etc/mysql/my.cnf

# The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 1. “/etc/mysql/mariadb.cnf” (this file) to set global defaults,
# 2. “/etc/mysql/conf.d/*.cnf” to set global options.
# 3. “/etc/mysql/mariadb.conf.d/*.cnf” to set MariaDB-only options.
# 4. “~/.my.cnf” to set user-specific options.
#
# If the same option is defined multiple times, the last one will apply.
#
# One can use all long options that the program supports.
# Run program with –help to get a list of available options and with
# –print-defaults to see which it would actually understand and use.

#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[mysqld]
port=10456

[client-server]

# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/

-mysql

執筆者:


comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)

関連記事

no image

古いMySQLをインストールした時にlibncursesw.so.5がないと怒られた

MySQL5.087をインストールしてデーモン起動してログインしようとしたら # ./bin/mysql -u mysql ./bin/mysql: error while loading share …

no image

mysqlのテーブルのクラッシュ

/usr/local/mysql/bin/myisamchk –recover –force –sort_buffer_size=2048M /usr/local/mysql/data/auc/ …

no image

sennaのインストール

かなり嵌ったので備忘録。sennaをインストールする際、configureのオプションを指定しないと、デフォルトの文字コードはeuc-jpでconfigureをすることになる。mecabで文字コードを …

no image

Table 'テーブル' is marked as crashed and should be repaired

データベースへ接続してsqlを実行したときに Table ‘テーブル’ is marked as crashed and should be repaired というエラーが返ってきた。エラーの内容は …

no image

ECC機能付きメモリとECC機能付きではないメモリの違い

メモリには様々な規格があるが、ECC機能が有るか無いかという違いもある。メモリのECC機能とは簡単に言うとデータのエラーをチェック・修正をする機能のことで、サーバなどの稼動に信頼性が求められるマシンに …