Fedora 17でMySQLをインストールする方法
1.yumでmysqlをインストール
yum install mysql
yum install mysql-server
yum install mysql-devel
yum install mysql-workbench
chgrp -R mysql /var/lib/mysql
chmod -R 770 /var/lib/mysql
service mysqld start
chkconfig mysqld on
2.MySQLの管理者を追加
mysqladmin -u root password 'newpassword’ #パスワード変更
mysql -u root -p #
mysql> DROP DATABASE test;
mysql> DELETE FROM mysql.user WHERE user = ";
mysql> FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON my_db.* TO 'user’@’localhost’ IDENTIFIED BY 'password’;
3.MySQLの基本操作
service mysqld restart
service mysqld stop
/etc/rc.d/init.d/mysqld status
chkconfig –del mysqld
chkconfig –list
/etc/init.d/mysqld start
/etc/init.d/mysqld stop
/etc/init.d/mysqld restart
/usr/bin/mysqladmin -u root -p’password’ shutdown