#tar xzvf mysql-5.5.28-linux2.6-x86_64.tar.gz #在/usr/local目录下 #ln -s mysql-5.5.28-linux2.6-x86_64 mysql #创建软链
#cp usr/local/mysql/support-files/my-medium.cnf etc/my.cnf
[client]
default-character-set = utf8
# password = your_passsword
port = 3306
socket = /tmp/mysql_3306.sock
# The MySQL server
[mysqld]
character-set-server = utf8
# user = mysql
port = 3306
socket = /tmp/mysql_3306.sock
skip-external-locking
basedir = /usr/local/mysql
datadir = /usr/local/mysql/data
log-error = /usr/local/mysql/log/mysql_error.log
pid-file = /tmp/mysql.pid
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
#./mysql_install_db --verbose --user=root --defaults-file=/etc/my.cnf --datadir=/usr/local/mysql/data --basedir=/usr/local/mysql --tmpdir=/tmp
#./mysqld_safe --defaults-file=/etc/my.cnf --socket=/tmp/mysql_3306.sock --user=root &
#./mysqladmin -u root -p [密码] shutdown
#./mysql -uroot
mysql>CREATE USER [用户名] IDENTIFIED BY ‘[密码]‘; mysql>CREATE USER [用户名]@[固定登录地址(譬如localhost)] IDENTIFIED BY ‘[密码]‘
mysql>GRANT select, insert, update, delete, create ON *.* TO [用户名]; mysql>GRANT select, insert, update, delete, create ON *.* TO [用户名]@[固定登录地址(譬如localhost)];
mysql>GRANT ALL PRIVILEGES ON PUREFTPD.* TO [用户名] IDENTIFIED BY ‘[新密码]‘;
[Linux基础环境/软件]Linux下安装mysql,布布扣,bubuko.com
原文:http://www.cnblogs.com/rond/p/3709164.html