MySQL 767byte問題
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
[[Linuxめも]]
*MySQL [#mdf33c2b]
MySQLではInnoDBエンジンのデフォルトでは、単一カラムインデ...
https://dev.mysql.com/doc/refman/5.6/ja/innodb-restrictio...
ERROR 1071 (42000): Specified key was too long; max key ...
my.confの設定変更により、3,072byteに拡張することができま...
[mysqld]
innodb_large_prefix
innodb_file_per_table=1
innodb_file_format=Barracuda
MySQL5.7.7からはファイルフォーマットはBarracudaが標準とな...
https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictio...
767byte制限がかかっている場合はutf8ではインデックスを作成...
MySQL5.5からサポートされるutf8mb4では191文字となります。
*MariaDB [#e7a4f66c]
MariaDBの場合、バージョン10.1ではダメっぽいのでバージョン...
リポジトリをインストールしてupdate。
$ curl -sS https://downloads.mariadb.com/MariaDB/mariadb...
$ sudo yum update MariaDB
怒られたので手動で行う必要がありそうです。
A MySQL or MariaDB server package (MariaDB-server-10.1.3...
Upgrading directly from MySQL 10.1 to MariaDB 10.2 may not
be safe in all cases. A manual dump and restore using m...
recommended. It is important to review the MariaDB manu...
section for version-specific incompatibilities.
A manual upgrade is required.
- Ensure that you have a complete, working backup of you...
files
- Shut down the MySQL server cleanly
- Remove the existing MySQL packages. Usually this comm...
list the packages you should remove:
rpm -qa | grep -i '^mysql-'
You may choose to use 'rpm --nodeps -ev <package-name>...
the package which contains the mysqlclient shared libr...
library will be reinstalled by the MariaDB-shared pack...
- Install the new MariaDB packages supplied by MariaDB F...
- Ensure that the MariaDB server is started
- Run the 'mysql_upgrade' program
This is a brief description of the upgrade process. Imp...
can be found in the MariaDB manual, in the Upgrading sec...
念の為に各データベースのdumpは取っておきましょう。
MariaDBを停止。
# systemctl stop mysql
MariaDBをアンインストールして、再度インストール。
# yum remove MariaDB-*
# yum install MariaDB
Postfixもアンインストールされてしまうので、再度インストー...
# yum install postfix
バックアップされていたmy.cnfを復活。
# mv /etc/my.cnf.rpmsave /etc/my.cnf
MariaDBを起動してupgradeコマンドを実行。
# systemctl start mysql
# mysql_upgrade
$ mysql --version
mysql Ver 15.1 Distrib 10.2.14-MariaDB, for Linux (x86_...
終了行:
[[Linuxめも]]
*MySQL [#mdf33c2b]
MySQLではInnoDBエンジンのデフォルトでは、単一カラムインデ...
https://dev.mysql.com/doc/refman/5.6/ja/innodb-restrictio...
ERROR 1071 (42000): Specified key was too long; max key ...
my.confの設定変更により、3,072byteに拡張することができま...
[mysqld]
innodb_large_prefix
innodb_file_per_table=1
innodb_file_format=Barracuda
MySQL5.7.7からはファイルフォーマットはBarracudaが標準とな...
https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictio...
767byte制限がかかっている場合はutf8ではインデックスを作成...
MySQL5.5からサポートされるutf8mb4では191文字となります。
*MariaDB [#e7a4f66c]
MariaDBの場合、バージョン10.1ではダメっぽいのでバージョン...
リポジトリをインストールしてupdate。
$ curl -sS https://downloads.mariadb.com/MariaDB/mariadb...
$ sudo yum update MariaDB
怒られたので手動で行う必要がありそうです。
A MySQL or MariaDB server package (MariaDB-server-10.1.3...
Upgrading directly from MySQL 10.1 to MariaDB 10.2 may not
be safe in all cases. A manual dump and restore using m...
recommended. It is important to review the MariaDB manu...
section for version-specific incompatibilities.
A manual upgrade is required.
- Ensure that you have a complete, working backup of you...
files
- Shut down the MySQL server cleanly
- Remove the existing MySQL packages. Usually this comm...
list the packages you should remove:
rpm -qa | grep -i '^mysql-'
You may choose to use 'rpm --nodeps -ev <package-name>...
the package which contains the mysqlclient shared libr...
library will be reinstalled by the MariaDB-shared pack...
- Install the new MariaDB packages supplied by MariaDB F...
- Ensure that the MariaDB server is started
- Run the 'mysql_upgrade' program
This is a brief description of the upgrade process. Imp...
can be found in the MariaDB manual, in the Upgrading sec...
念の為に各データベースのdumpは取っておきましょう。
MariaDBを停止。
# systemctl stop mysql
MariaDBをアンインストールして、再度インストール。
# yum remove MariaDB-*
# yum install MariaDB
Postfixもアンインストールされてしまうので、再度インストー...
# yum install postfix
バックアップされていたmy.cnfを復活。
# mv /etc/my.cnf.rpmsave /etc/my.cnf
MariaDBを起動してupgradeコマンドを実行。
# systemctl start mysql
# mysql_upgrade
$ mysql --version
mysql Ver 15.1 Distrib 10.2.14-MariaDB, for Linux (x86_...
ページ名: