安装mysql

1206阅读 0评论2011-05-10 allenquan
分类:LINUX

MySQL安装的一般步骤如下:

shell> groupadd mysql //增加组

shell> useradd -g mysql mysql //增加mysql用户
shell> tar zxvf mysql-VERSION.tar.gz  //
解压源码
shell> cd mysql-VERSION
s
hell> ./configure --prefix=/usr/local/mysql //编译参数
shell> make && make install   //
编译、安装(可能要自己创建/usr/local/mysql/var)

shell> cp xxx/my.cnf /etc/my.cnf  //把配置文件复制到全局位置,或者     mysql/etc/   (有可能是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 &

shell>cd /bin

shell> sudo ln -s /usr/local/mysql/bin/mysql mysql

 

http://blog.sina.com.cn/s/blog_643fbeef0100kkeh.html

 

上一篇:gtest的参数化
下一篇:动态库的编译,与生成