免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1041 | 回复: 0
打印 上一主题 下一主题

Installing MySQL [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-12-20 11:46 |只看该作者 |倒序浏览
1.creat account
$ pw groupadd mysql
$ pw useradd mysql -c "MySQL Server" -d /dev/null -g mysql -s /sbin/nologin
2.Compiling MySQL
$ ./configure --prefix=/usr/local/mysql --with-mysqld-user=mysql --with-unix-socket-path=/tmp/mysql.sock --with-mysqld-ldflags=-all-static   //在同一行
$ make
$ make install
$ strip /usr/local/mysql/libexec/mysqld //进入mysql目录后执行
$ scripts/mysql_install_db
$ chown -R root /usr/local/mysql
$ chown -R mysql /usr/local/mysql/var
$ chgrp -R mysql /usr/local/mysql
3.Copy configuration file
$ cp support-files/my-medium.cnf /etc/my.cnf
$ chown root:sys /etc/my.cnf
$ chmod 644 /etc/my.cnf
4.Start the server
$ /usr/local/mysql/bin/mysqld_safe &
5.Test the connection
Try to establish a connection with the database as follows:
$ /usr/local/mysql/bin/mysql -u root mysql
mysql> show databases;
mysql> quit;
6.shutdown the database
/usr/local/mysql/bin/mysqladmin -u root shutdown


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/52955/showart_446300.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP