お疲れ様です。
CentOSにMySQLをインストールしてみましたので
備忘録します。
手順
1.yumによるインストール
[root@localhost ~]# yum install -y mysql-server
自動的にインストールが始まります。
2.MySQL起動
[root@localhost ~]# service mysqld start
起動します。
3.パスワードの設定
MySQLを起動した状態で
[root@localhost etc]# mysqladmin -u root password '設定したいパスワード';
設定後は、パスワードの確認をお粉します。
[root@localhost etc]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
無事ログインできました。
4.MySQL終了
[root@localhost ~]# service mysqld stop
ついでに再起動は
[root@localhost ~]# service mysqld restart
となります。
5.バージョンの確認
[root@localhost ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> select version(); ←
+-----------+
| version() |
+-----------+
| 5.0.77 |
+-----------+
1 row in set (0.00 sec)
mysql>
以上