1年以上前に更新された記事です。
情報が古い可能性がありますので、注意してください。
情報が古い可能性がありますので、注意してください。
MySQLをインストールする。
インストール
$ sudo apt-get install mysql-server
MySQLのrootパスワードを入力。
rootパスワードの確認のため、先ほど入力したパスワードを再度入力。
MySQL設定
文字コードをutf-8にするため、設定ファイルに一行追加する。
$ sudo vi /etc/mysql/my.cnf [mysqld] character-set-server = utf8 $ sudo service mysql restart
MySQL確認
MySQLにログインできるか確認。
$ mysql -u root -p Enter password:(インストール時に設定したパスワード) Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 45 Server version: 5.5.44-0+deb8u1 (Raspbian) Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | +--------------------+ 3 rows in set (0.00 sec) mysql>
コメントを残す