CentOS Yum編譯安裝MySQL 5.6

發(fā)布時(shí)間:2024-01-21
服務(wù)器
本文實(shí)例為大家分享了centos yum安裝mysql 5.6的具體代碼,供大家參考,具體內(nèi)容如下
1.檢查系統(tǒng)是否安裝其他版本的mysql數(shù)據(jù)
#yum list installed | grep mysql#yum -y remove mysql-libs.x86_642.安裝及配置
# wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm# rpm -ivh mysql-community-release-el6-5.noarch.rpm# yum repolist all | grep mysql安裝mysql數(shù)據(jù)庫(kù)
# yum install mysql-community-server -y設(shè)置為開(kāi)機(jī)啟動(dòng)(2、3、4都是on代表開(kāi)機(jī)自動(dòng)啟動(dòng))
# chkconfig --list | grep mysqld# chkconfig mysqld on3.設(shè)置遠(yuǎn)程root
啟動(dòng)mysql
# service mysqld start設(shè)置root密碼
# mysql_secure_installation登陸root賬號(hào)
# mysql -uroot -p 建立遠(yuǎn)程root用戶
mysql> grant all privileges on *.* to \\\'root\\\'@\\\'%\\\' identified by \\\'你設(shè)置的密碼\\\' with grant option;mysql> flush privileges;
4.設(shè)置utf-8編碼
查看mysql原本編碼:
mysql> show variables like \\\'character%\\\';設(shè)置編碼
# vi /etc/my.cnf如下(少補(bǔ)):
[mysqld]character-set-server=utf8 collation-server=utf8_general_ci[mysql]default-character-set = utf8[mysql.server]default-character-set = utf8[mysqld_safe]default-character-set = utf8[client]default-character-set = utf8重啟mysql
# service mysqld restart再次查看編碼:
# mysql -uroot -pmysql> show variables like \\\'character%\\\'; -------------------------- ---------------------------- | variable_name | value | -------------------------- ---------------------------- | character_set_client | utf8 || character_set_connection | utf8 || character_set_database | utf8 || character_set_filesystem | binary || character_set_results | utf8 || character_set_server | utf8 || character_set_system | utf8 || character_sets_dir | /usr/share/mysql/charsets/ | -------------------------- ---------------------------- 8 rows in set (0.00 sec)5.加入環(huán)境變量,編輯 /etc/profile,這樣可以在任何地方用mysql命令
export path=$path:/usr/local/mysql//bin<br>source /etc/profile精彩專題分享:mysql不同版本安裝教程 mysql5.7各版本安裝教程 mysql5.6各版本安裝教程
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持西部數(shù)碼。
上一個(gè):金稅盤(pán)用戶密碼和口令是什么(金稅盤(pán)初始密碼和口令怎么總是提示說(shuō)錯(cuò)誤)
下一個(gè):windows7代理服務(wù)器設(shè)置(win7設(shè)置代理服務(wù)器和端口)

怎么固定華為壁紙,手機(jī)壁紙?jiān)鯓庸潭ㄈA為C8600 安桌系統(tǒng)
CR0805F81R87G 麗智電阻0805 1.87Ω ±1%
火了多年的古樹(shù)普洱茶,樹(shù)齡熟如何測(cè)定的?
發(fā)財(cái)樹(shù)的風(fēng)水學(xué)
為何有些普洱茶苦澀不能化
雷電模擬器定位軟件下載(雷電模擬器定位軟件app)
RTT0123R7FTH現(xiàn)貨庫(kù)存,最新價(jià)格
配電室設(shè)備安裝規(guī)范
手機(jī)如何變成橫屏電腦(把手機(jī)桌面變成橫屏)
保養(yǎng) 喝些紅棗枸杞茶
十八禁 网站在线观看免费视频_2020av天堂网_一 级 黄 色 片免费网站_绝顶高潮合集Videos