1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ubuntu 14.04 LTS 開発環境構築ログ #05

Last updated at Posted at 2016-03-19

MariaDBとPHPをインストール

$ sudo apt install mariadb-server
$ sudo apt install php5 php5-mysqlnd php5-mcrypt php5-gd php5-curl

MariaDBの文字コードをUTF-8に変更

$ cd /etc/mysql
$ sudo cp -p my.cnf my.cnf.org
$ sudoedit my.cnf
$ diff -u my.cnf my.cnf.org
--- my.cnf      2016-03-19 17:16:06.000000000 +0900
+++ my.cnf.org  2014-02-20 06:18:21.000000000 +0900
@@ -32,7 +32,6 @@
 #
 # * Basic Settings
 #
-character-set-server = utf8
 user           = mysql
 pid-file       = /var/run/mysqld/mysqld.pid
 socket         = /var/run/mysqld/mysqld.sock
$

MariaDBを再起動

$ sudo service mysql restart

MariaDBの文字コードを確認

$ mysql -uroot -p
MariaDB [(none)]> show variables like 'char%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8                       |
| character_set_connection | utf8                       |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | utf8                       |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.01 sec)

MariaDB [(none)]> quit
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?