亚洲韩日午夜视频,欧美日韩在线精品一区二区三区,韩国超清无码一区二区三区,亚洲国产成人影院播放,久草新在线,在线看片AV色

您好,歡迎來到思海網絡,我們將竭誠為您提供優質的服務! 誠征網絡推廣 | 網站備案 | 幫助中心 | 軟件下載 | 購買流程 | 付款方式 | 聯系我們 [ 會員登錄/注冊 ]
促銷推廣
客服中心
業務咨詢
有事點擊這里…  531199185
有事點擊這里…  61352289
點擊這里給我發消息  81721488
有事點擊這里…  376585780
有事點擊這里…  872642803
有事點擊這里…  459248018
有事點擊這里…  61352288
有事點擊這里…  380791050
技術支持
有事點擊這里…  714236853
有事點擊這里…  719304487
有事點擊這里…  1208894568
有事點擊這里…  61352289
在線客服
有事點擊這里…  531199185
有事點擊這里…  61352288
有事點擊這里…  983054746
有事點擊這里…  893984210
當前位置:首頁 >> 技術文章 >> 文章瀏覽
技術文章

Centos安裝mysql數據庫的方法

添加時間:2017-9-11 23:02:15  添加: 思海網絡 
1、首先下載MySQL的安裝文件,我這里安裝的是MySQL5.1.7版本的,

2、安裝MySQL數據庫服務器

進入安裝包所在文件夾,執行命令 rpm -ivh MySQL-server-5.1.7-0.i386.rpm 安裝MySQL服務器。

如果報了與原先版本沖突的話,就執行rpm -qa|grep -i mysql命令,會顯示已安裝的Mysql版本,我的顯示mysql-libs-5.1.61-4.el6.i686
這時如果有的話就強制刪除:rpm -e --nodeps mysql-libs-5.1.61-4.el6.i686(因為有包依賴,所以要強制刪除)

我的報錯提示如下:



代碼如下:
MySQL-server-5.1.7-0.i386.rpm 
Preparing... ########################################### [100%]
file /usr/share/mysql/charsets/README from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/cp1250.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/cp1251.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/cp1256.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/cp1257.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/cp850.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/cp852.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/cp866.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/dec8.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/geostd8.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/greek.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/hebrew.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/hp8.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/keybcs2.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/koi8r.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/koi8u.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/latin1.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/latin2.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/latin5.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/latin7.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/macce.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/macroman.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/charsets/swe7.xml from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/french/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/german/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/greek/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/hungarian/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/italian/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/japanese/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/korean/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/norwegian-ny/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/norwegian/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/polish/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/portuguese/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/romanian/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/russian/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/serbian/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/slovak/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/spanish/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/swedish/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686
file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-server-5.1.7-0.i386.rpm conflicts with file from package mysql-libs-5.1.61-4.el6.i686

這時候再執行rpm -ivh MySQL-server-5.1.7-0.i386.rpm安裝即可安裝成功。
我這里安裝成功了,但是mysql服務無法啟動,總是啟動失敗,后來百度了一下,是因為selinux的原因,只要將selinux關閉就OK了。
關閉selinux:vi /etc/selinux/config 將SELINUX=enforcing 改成SELINUX=disabled 然后重啟
關閉selinux之后還是無法啟動mysql服務,因為安裝的mysql所有者是root,在安裝mysql的時候會創建一個用戶mysql,只要將/var/lib/mysql
的所有者改為mysql就OK了,執行命令chown -R mysql:mysql /var/lib/mysql
現在執行service mysql start終于可以啟動mysql服務了。

 

3.安裝MySQL客戶端
執行命令rpm -ivh MySQL-client-5.1.7-0.i386.rpm進行安裝。

4.安裝成功

成功安裝MySQL后將sql文件導入到數據庫,步驟如下:

進入MYSQL Command Line Client 
1、先創建數據庫:create database test 注:test是創建數據庫的名稱 
2、再切換到當前數據庫:use test 
3、再輸入:\. /root/test.sql 或 souce /root/test.sql

按照以上步驟就可以將備份的sql腳本導入到linux中的數據庫中去。


關鍵字:Centos、mysql、數據庫
分享到:

頂部 】 【 關閉
版權所有:佛山思海電腦網絡有限公司 ©1998-2024 All Rights Reserved.
聯系電話:(0757)22630313、22633833
中華人民共和國增值電信業務經營許可證: 粵B1.B2-20030321 備案號:粵B2-20030321-1
網站公安備案編號:44060602000007 交互式欄目專項備案編號:200303DD003  
察察 工商 網安 舉報有獎  警警  手機打開網站