linux系统下安装mysql

一.下载安装装包

1.MySQL-client-5.6.5_m8-1.linux2.6.i386.rpm

2.MySQL-server-5.6.5_m8-1.linux2.6.i386.rpm

二.开始安装

1)安装服务器端
在有两个rmp文件的目录下运行如下命令:
[root@localhost mysql]# rpm -ivh MySQL-server-5.6.5_m8-1.linux2.6.i386.rpm
显示如下信息。
warning: MySQL-server-5.6.5_m8-1.linux2.6.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing... ########################################### [100%]
1:MySQL-server ########################################### [100%]
。。。。。。(省略显示)
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h test1 password 'new-password'
。。。。。。(省略显示)
Starting mysqld daemon with databases from /var/lib/mysql
如出现如上信息,服务端安装完毕。测试是否成功可运行netstatMysql端口是否打开,如打开表示服务已经启动,安装成功。Mysql默认的端口是3306

启动mysql

[root@localhost mysql]# /etc/init.d/mysql start

查看3306端口是否开启

[root@localhost mysql]# netstat -nat

2)安装客户端
运行如下命令:
[root@test1 local]# rpm -ivh MySQL-client-5.6.5_m8-1.linux2.6.i386.rpm
warning:MySQL-client-5.6.5_m8-1.linux2.6.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing... ########################################### [100%]
1:MySQL-client ########################################### [100%]
显示安装完毕。

三.登录mysql

[root@localhost mysql]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.0.16-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
出现了“mysql>”提示符,恭喜你,安装成功!


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值