免费注册 查看新帖 |

Chinaunix

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

OpenBSD 下安装Mysql遇到问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-15 10:39 |只看该作者 |倒序浏览
用packages 安装好mysql5 可以启动 但是从新启动系统后在运行提示
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)

论坛徽章:
1
白银圣斗士
日期:2015-11-23 08:33:04
2 [报告]
发表于 2008-07-15 10:54 |只看该作者
哦。。看一下3306端口起来没有?

论坛徽章:
0
3 [报告]
发表于 2008-07-15 11:25 |只看该作者
好像没起来

论坛徽章:
1
白银圣斗士
日期:2015-11-23 08:33:04
4 [报告]
发表于 2008-07-15 11:40 |只看该作者
那看一下mysql的错误日志文件。上面应该有记录为啥记的起来。

论坛徽章:
0
5 [报告]
发表于 2008-07-21 16:37 |只看该作者

参见 README.OpenBSD

Using MySQL in an OpenBSD environment

If you are installing MySQL for the first time, you have to create
a default database first. In order to create the database, please run
/usr/local/bin/mysql_install_db

The default limit in the GENERIC kernel for number of open
files is not large enough for a database with more than a handful
of tables, or a large number of connections. A server running
such a database should have at least the following in
/etc/sysctl.conf:

        kern.maxfiles=4096

This number should be tuned depending on system use. You will also
need to tune the values in the my.cnf file (examples available in
/usr/local/share/mysql).

By default, the _mysql user, and so the mysqld processes run in
the login(1) class of "daemon". On a busy server, it may be advisable
to put the _mysql user and processes in their own login(1) class
with tuned resources, such as more open file descriptors etc.

For example, add this to the login.conf(5) file:

        mysql:\
                penfiles-cur=1024:\
                penfiles-max=2048:\
                :tc=daemon:

Rebuild the login.conf.db file if necessary:

        # cap_mkdb /etc/login.conf

And start the server like this:

        if [ -x /usr/local/bin/mysqld_safe ] ; then
                su -c mysql root -c '/usr/local/bin/mysqld_safe >/dev/null 2>&1 &'
                echo -n ' mysql'
        fi

mysqld_safe(1) is the recommended way to start a mysqld server,
it creates the directory for the socket and adds some safety
features such as restarting the server when an error occurs
and logging runtime information to an error log file. Options
may be passed in the [mysqld_safe] section of my.cnf.

Note that the classes in login.conf(5) are used by login(1);
they do not apply to normal process startup, hence the use of su(1).

For larger servers and dedicated database servers, these numbers
and memory limits (e.g. datasize and stacksize) may also need to be
increased. Please report any changes and experiences to the package
maintainers so that we can update this file for future versions.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP