当前位置:Gxlcms > 数据库问题 > CentOS 6.5 安装MySQL数据库

CentOS 6.5 安装MySQL数据库

时间:2021-07-01 10:21:17 帮助过:3人阅读

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

 

CentOS 6.5 安装MySQL数据库

标签:

人气教程排行