CentOS 6.4安装 MySQL 服务器的方式_数据库删除文件

日期:2014-07-13 / 人气: / 来源:网络

 安装不了,用rpm -qa|grep -i mysql 查看发现 centos中虽然以前没有安装过 mysql但里面还是安装了
[root@***-3 soft]# rpm -qa|grep -i mysql
mysql-libs-5.1.52-1.el6_0.1.x86_64
然后用命令
[root@***-3 soft]# yum -y remove mysql mysql-*
Loaded plugins: fastestmirror, refresh-packagekit
Setting up Remove Process
No Match for argument: mysql
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_6
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base
接着用命令[root@***-3 soft]#rpm -e --nodeps mysql-libs-5.1.52-1.el6_0.1.x86_64
成功卸载
然后重新安装
 [root@***-3 soft]# rpm -ivh MySQL-server-5.5.29-2.el6.x86_64.rpm
Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [100%]
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 xu-3 password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.
See the manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!
启动mysql服务
[root@***-3 soft]# /etc/rc.d/init.d/mysql start 或 者 service mysql start
Starting MySQL..                         [  OK  ]
检查端口
netstat -nat
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN
服务已经启动!

CentOS 系统中编译安装MySQL 5数据库

下载页面:http://dev.mysql.com/downloads/mysql/5.1.html#downloads到页面底部,找到Source downloads,这个是源码版本,下载第1个Tarballgroupadd mysql新建一个名为mysql

MySQL

作者:管理员




现在致电4006-2991-90 OR 查看更多联系方式 →

Go To Top 回顶部