slack ware下安装配置mysql
时间:2006-06-06 来源:yancncen
slack ware下安装mysql.
最近在slack ware下安装配置了mysql,把过程记录下来.
文件:mysql-standard-5.0.20.tar.gz
(1)解压到/usr/local/mysql下
gunzip mysql-standard-5.0.20.tar.gz
tar -vxf mysql-standard-5.0.20.tar
cp -r mysql-standard-5.0.20 mysql
rm -r mysql-standard-5.0.20
(2)安装
./configure --prefix=/usr/local/mysql --with-charset=gbk --with-extra-charsets="gbk gb2312"
(3)安装后配置
./scripts/mysql_install_db
若出错,把./share/fill_help_tables.sql复制到./support-files/目录下
(4)把配置文件放到/etc/my.cnf
cp ./support-files/my-small.cnf /etc/my.cnf
修改/ect/my.cnf
在[mysqld]下加入
user = root //以root启动mysql
default-character-set = gb2312 //修改默认字符集为gb2312
(5)为root添加密码,并用root登陆到mysql
./bin/mysqladmin -u root password 'new-password'
mysql -hlocalhost -uroot -pnew-password
(6)新建远程登陆的用户
GRANT ALL PRIVILEGES ON *.* TO "user"@"%" IDENTIFIED BY "password" WITH GRANT OPTION
(6)启动mysql
/usr/local/mysql/support-files/mysql.server start
相关阅读 更多 +