まとまりのないブログ

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

Table is marked as crashed

昨日、プログラム側でmysqlのテーブルがクラッシュしているという返事を受け取った。はあ、またか・・・と思いながらcheck tableを該当するテーブルで実行してみる。

no image

mysqlのレプリケーションでのエラー

[ERROR] Slave: Error ‘You have an error in your SQL syntax; check the manual that corresponds …

no image

Wrong bytesec: 49-48-48 at linkstart: 14313808772

またテーブルのクラッシュ。mysqlのテーブルがクラッシュする頻度が激増してきた。以前はこんなことなかったのだが・・・。今は一日一回発生して絶えず見張っていなければならないという状態になってしまってい …

no image

myisamchk: error: myisam_sort_buffer_size is too small

myisamchkを実行したときに myisamchk: error: myisam_sort_buffer_size is too small Try fixing it by using the …

no image

myisamchkの修復時に作成されるTMDファイル

テーブルの修復をしようとしたらtempfileが作成できないという下記のエラーが発生した。