Chinaunix首页 | 论坛 | 博客
  • 博客访问: 91434603
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: Mysql/postgreSQL

2008-04-05 13:05:39

作者: Keiboc  出自:
按以下完装可以解决 MYSQL 中文乱码问题 安装字体为GBK编码

我在linux 9 和linux as 3,linux as 4 下成功安装多次。

#groupadd mysql
#useradd -g mysql mysql
#tar -zxvf mysql-5.0.27.tar.gz
#cd mysql-5.0.27
#./configure -prefix=/opt/mysql -with-charset=gbk -with-extra-charsets=all
#make
#make install
#cp support-files/my-medium.cnf /etc/my.cnf或者cp /opt/mysql/share/mysql/my-medium.cnf /etc/my.cnf
#./scripts/mysql_install_db --user=mysql //初试化表并且规定用mysql用户来访问。初始化表以后就开始给mysql和root用户设定访问权限

设置用户权限
#chown -R root .
#chown -R mysql var
#chown -R mysql var/.
#chgrp -R mysql .

# cp support-files/mysql.server /etc/rc.d/init.d/mysqld
# chmod 700 /etc/init.d/mysqld
# chkconfig --add mysqld
# chkconfig --level 345 mysqld on
# service mysqld start
# netstat -atln 查看mysql端口3306是否打开,如果打开说明安装成功

更改root用户密码
#./bin/mysqladmin -u root password 'new passwd'

use 库名; 切换库名
create table 表名 (字段设定列表); 创建表
create database 库名; 创建数据库

#grant select,insert,update,delete,index,alter,create,drop,grant,references,reload,shutdown,process,file,reload,shutdown,precess on *.* to user_1@"%" Identified by '123';

#grant select,insert,update,delete,index,alter,create,drop on 库名.表名 to user_1@"%" Identified by "123";
阅读(396) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~