1) MySQLをインストール
yum -y install mysql-server
2)MySQLをパソコンの実行時スタートする
chkconfig mysqld –list
chkconfig mysql on
3)MySQLスタートする
service mysqld status
service mysqld restart
4)MySQLのパスワード
mysqladmin -u root password sqladmini
5)phpMyAdminインストール前EPEL – FedoraProjectをインストールする
http://fedoraproject.org/wiki/EPEL
6)後でphpMyAdminをインストール
yum -y install phpMyAdmin
7)Apacheサーバーを再起動する
service httpd restart
8)ウェブブラウザに書く:
http://localhost/phpMyAdmin
MySQLとphpMyAdminで楽しむことができます。
—————————————————————————–
日本語環境用の設定
日本語環境で利用するにあたり必要な基本設定とmbstringの設定を行います。
設定は/etc/php.iniで行います。設定項目と内容を以下に示します。
; PHP’s default character set is set to empty.
; http://www.php.net/manual/en/ini.core.php#ini.default-charset
default_charset = “UTF-8”
date.timezone = “Asia/Tokyo”
[mbstring]
; language for internal character representation.
; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.language
mbstring.language = Japanese
mbstring.internal_encoding = UTF-8
mbstring.http_input = pass
mbstring.http_output = pass
mbstring.encoding_translation = Off
mbstring.detect_order = auto
mbstring.substitute_character = none;
mbstring.func_overload = 0
mbstring.strict_detection = Off
mbstring.http_output_conv_mimetype=
—————————————————————————-
http://tatsunet.net/cgi-bin/mt/mt-search.cgi?blog_id=2&tag=CentOS&limit=20
my.cnfファイルを編集する。
[root@localhost ~]# vi /etc/my.cnf
/etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
character-set-server = utf8
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysql]
default-character-set = utf8
—————————————————————————-
Another way to install phpMyAdmin:
https://kezhong.wordpress.com/2011/04/18/install-phpmyadmin-on-centos-5-6/
コメントを残す