Chinaunix首页 | 论坛 | 博客
  • 博客访问: 160261
  • 博文数量: 27
  • 博客积分: 97
  • 博客等级: 民兵
  • 技术积分: 314
  • 用 户 组: 普通用户
  • 注册时间: 2012-11-19 19:34
个人简介

非攻飞攻,夜尽天明!

文章分类

全部博文(27)

文章存档

2014年(6)

2013年(21)

我的朋友

分类: BSD

2013-12-09 18:13:51

 
在openbsd 下,安装 mysql : pkg_add  mysql-server

启动: #mysqld_safe

首先提示:  /var/mysql/my.domain.err   does't exists!

             手动创建 # touch /var/mysql/my.domain.err


然后 : 再 #mysqld_safe 
  
          '/var/run/mysql/mysql.sock' exists!  ?

           


# mysql_install_db                                                             
WARNING: The host 'mudan.my.domain' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
131209 17:49:58 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
OK
Filling help tables...
131209 17:49:58 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
OK

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/local/bin/mysqladmin -u root password 'new-password'
/usr/local/bin/mysqladmin -u root -h my.domain password 'new-password'

Alternatively you can run:
/usr/local/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

Please report any problems with the /usr/local/bin/mysqlbug script!



按照上面的提示:#mysqld_safe     --skip-locking
                    再
                         #/usr/local/bin/mysqladmin -u root password 'new-password'


                     最后
#mysql -u root -p
Enter password:  new-password          

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.70-log OpenBSD port: mysql-server-5.1.70v0

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>




OK!

阅读(1799) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~