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

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: Mysql/postgreSQL

2008-04-19 11:39:33

作者: ketto     出自:
所有这些操作需要root权限
安装开始:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql --with-charset=gb2312
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
(用mysql用户启动很重要。)
shell> bin/mysql -uroot -p
(输入密码,默认密码为空,直接回车即可)
shell> Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
如果出现上面的提示,说明mysql服务没有正常启动,因为mysql服务启动的话,会自动生成mysql.sock文件
shell> killall mysql
杀掉所有mysql进程,重新启动
shell> bin/mysql_install_db --user=mysql
重新启动
shell> bin/mysql -uroot -p
阅读(365) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~