-
5.0.95
phpMyAdmin
- 버전 확인
$ mysql -u testuser -p
mysql> select version(); ## or SHOW VARIABLES LIKE 'version';
# service mysqld status
$ netstat -an | grep mysql
$ mysql --version
$ mysqladmin -uroot -p version | grep ^Server
$ yum list installed mysql*
$ rpm -qa | grep ^mysql
-
/etc/my.cnf
[mysqld] > datadir
/var/lib/mysql
# service mysqld stop
# chmod 755 -R /var/lib/mysql
# chown mysql:mysql -R /var/lib/mysql
# service mysqld start
- 설치
# yum install mysql-server
# service mysqld start
# chkconfig --list mysqld
# chkconfig mysqld on
- 패스워드 변경
$ mysqladmin -uroot -p password 'P@ssw0rd'
or
$ mysql -u root -p
mysql> SET PASSWORD for 'root'@'localhost'=password('P@ssw0rd');
or
mysql> UPDATE mysql.user SET Password=PASSWORD('P@ssw0rd') WHERE USER='root' AND Host='localhost';
mysql> FLUSH PRIVILEGES;
mysql> use mysql
mysql> select host, user, password from user;
- root 패스워드 분실# service mysqld stop# mysqld_safe --skip-grant &# mysql -uroot mysqlmysql> UPDATE user SET Password=PASSWORD('P@ssw0rd') WHERE USER='root' AND Host='localhost';mysql> FLUSH PRIVILEGES;# service mysqld restart-C:>mysqladmin -uroot -p create php_sample$ mysql [-h 192.168.0.xxx] -ujjryu -p[ ADOTest]mysql> SET SESSION old_passwords=(FALSE|0);mysql> SET PASSWORD [FOR jjryu]=PASSWORD('P@ssw0rd');mysql> set names (utf8|euckr)참조 사이트:
http://jmnote.com/wiki/MySQL_%EB%B2%84%EC%A0%84_%ED%99%95%EC%9D%B8
http://jmnote.com/wiki/%EB%A6%AC%EB%88%85%EC%8A%A4_MySQL_%EC%84%A4%EC%B9%98
http://jmnote.com/wiki/MySQL_%ED%8C%A8%EC%8A%A4%EC%9B%8C%EB%93%9C_%EB%B3%80%EA%B2%BD
http://jmnote.com/wiki/MySQL_root_%ED%8C%A8%EC%8A%A4%EC%9B%8C%EB%93%9C_%EB%B6%84%EC%8B%A4
http://jmnote.com/wiki/MySQL%EC%97%90_%EC%9B%90%EA%B2%A9_%EC%A0%91%EC%86%8D_%ED%97%88%EC%9A%A9
http://jmnote.com/wiki/MySQL_%EC%BA%90%EB%A6%AD%ED%84%B0%EC%85%8B_utf8_%EC%84%A4%EC%A0%95
http://ko.wikipedia.org/wiki/MySQL