您的位置:首页 > 数据库 > MySQL

使用 yum 命令安装 mysql

2011-09-28 07:18 567 查看
1. 使用 yum 命令安装 mysql
yum -y install mysql-server
2. 查看一下有没有mysql服务
chkconfig --list | grep mysql

mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off
3. 启动mysqld
/etc/init.d/mysqld start
starting MySQL: [ok]
4. 修改root账号密码
mysqladmin -u root password '123456'
5. 连接到mysql
mysql -u root -p
输入密码
Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 4

Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: