标签:
[root@seeker~]# yum -y install mysql-server //安装命令 [root@seeker~]# service mysqld start //连接之前先启动服务 [root@seeker~]# chkconfig mysqld on //开机启动设置,也可以手动开启 [root@seeker~]# mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. ...... //安装成功之后密码为空,需要自己重新设置。 mysql> set password for root@localhost=password(‘root‘); mysql> exit //用新密码登陆 [root@seeker~]# mysql -u root -p //测试 show databases; //查看系统已存在的数据库 use test; //选择需要使用的数据库 exit //退出数据库的连接 其他命令: rpm -qa|grep mysql //显示已安装的mysql版本 也可以通过下载rpm软件包来安装mysql
标签:
原文地址:http://www.cnblogs.com/liun1994/p/5850121.html