CentOS mysql configuration

  
 

1. Install mysql #yum install mysql-server mysql-devel mysql2. View mysql version # mysql --versionmysql Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.13. Configure mysql# vim /etc/my.cnf[mysqld]datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockuser=mysql# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0

[mysqld_safe]log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.piddefault-character-set = utf8 --add [mysql] --add default-character-set = utf8 -- add 4. start mysql # chkconfig mysqld on ----- set mysql service to start with system # chkconfig --list mysqldmysqld 0: close 1: close 2: enable 3: enable 4: enable 5: enable 6: Close---- Confirm mysql self-start. If 2--5 is enabled, ok# /etc/rc.d/init.d/mysqld start is starting mysqld: [OK] 5. Query has been started # ps -ef

Copyright © Windows knowledge All Rights Reserved