FC7下mysql安装与启动

一:安装
    无论你喜欢的是哪种LINUX套件,它都有可能带有MySQL。Slackware,Ret Hat,SusE和Debian中都在它们的当前版本中包含了它,这将提供一种最简单的方式来快速安装和运行MySQL。如果你的发行版本中没有提供MySQL软件包,或者你想得到最新的版本,你可以从MySQL的网站:www.mysql.com上下载二进制包或源代码包。
    在Fedora 7的的桌面左上方,点击如下:
    “应用程序“-->“添加/删除软件“,在弹出的对话软件更新安装列表首页中,选择“服务器“,然后选择右面的 MySQL进行安装即可。
    在MySQL的安装过程中,安装脚本会为你自动创建一个初始数据库。同样,你也能得到一个用于启动和停止服务的init.d脚本(通常位于/etc/rc.d/init.d目录中)mysqld或mysql.

二:启动
    安装后,可以以root身份使用/etc/rc.d/init.d/myqsld(或是mysql) start命令来启动服务器.也可以用 serviceconf命令启动图形化界面来启动mysql。

 

[root@localhost init.d]# /etc/rc.d/init.d/mysqld start
初始化 MySQL 数据库: Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

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

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
                                                           [确定]
启动 MySQL:                                               [确定]







三 :运行级别


    由于你使用的系统可能包含chkconfig命令,它提供了一种更简单的方式来设置一个服务的运行级别。例如,为了设置MySQ服务器在运行级别3和5上运行,你必须首先将MySQL添加为受chkconfig管理的服务。
    chkconfig 版本 1.3.34 - 版权 (C) 1997-2000 Red Hat, Inc.
    在 GNU 公共许可的条款下,本软件可以被自由发行。

    用法:    chkconfig --list [name]
         chkconfig --add <name>
         chkconfig --del <name>
         chkconfig --override <name>
         chkconfig [--level <levels>] <name> <on|off|reset|resetpriorities>
    用下面命令添加:
    chkconfig --add mysqld             //(我的是mysqld)
    现在我们在级别3和5上设定服务为:"on",在其它级别上设置为:"off":
    [root@localhost init.d]# chkconfig --level 35 mysqld on
    [root@localhost init.d]# chkconfig --level 35 mysqld on
    再用level查看:
    [root@localhost init.d]# chkconfig --list mysqld
    mysqld          0:关闭  1:关闭  2:关闭  3:启用  4:关闭  5:启用  6:关闭
   

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值