歡迎點擊此處訂閱本Blog

日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

在Linux上安裝MySQL 5.0

系統 2007 0
<!-- Feedsky FEED發布代碼開始 -->

歡迎點擊此處訂閱本Blog

<!-- FEED自動發現標記開始 --> <!-- FEED自動發現標記結束 -->

Blog 訂閱

<!--Google 468*60橫幅廣告開始-->

<script type="text/javascript"><!-- google_ad_client = "pub-7343546549496470"; google_ad_width = 468; google_ad_height = 60; google_ad_format = "468x60_as"; google_ad_type = "image"; //2007-07-26: CSDN google_ad_channel = "6063905817"; google_color_border = "6699CC"; google_color_bg = "E6E6E6"; google_color_link = "FFFFFF"; google_color_text = "333333"; google_color_url = "AECCEB"; google_ui_features = "rc:6"; // --></script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>

<!--Google 468*60橫幅廣告結束-->

1)
# groupadd mysql
# useradd mysql -g mysql

2)
進入mysql安裝目錄后執行
./scripts/mysql_install_db --user=mysql
(初試化表并且規定用mysql用戶來訪問。初始化表以后就開始給mysql和root用戶設定訪問權限)

3)
chown -R root .
chown -R mysql data
(data目錄里面存的是mysql的數據庫文件.這個目錄是在/etc/my.cnf中有配置,在mysql_install_db時產生)
chown -R mysql data /.
(設定mysql用戶能訪問/usr/local/mysql/data/mysql下的所有文件)
chgrp -R mysql .
(設定mysql組能夠訪問/usr/local/mysql)

4)
啟動
./bin/mysqld_safe --user=mysql &
(如果沒有問題的話,應該會出現類似這樣的提示:
[1] 42264
# Starting mysqld daemon with databases from /usr/local/mysql/var
如果出現 mysql ended這樣的語句,表示Mysql沒有正常啟動,你可以到log中查找問題,Log文件的通常在/etc/my.cnf中配置。大多數問題是權限設置不正確引起的。)

5)
修改默認密碼
./bin/mysqladmin -u root password yourpassword

6)
# cp support-files/mysql.server /etc/rc.d/init.d/mysqld
# chmod 700 /etc/init.d/mysqld
# chkconfig --add mysqld
# chkconfig --level 345 mysqld on
(設置使mysql每次啟動都能自動運行)

7)
# service mysqld start
# netstat –atln
(啟動mysql服務,查看端口號)
service mysqld status(查看服務狀態)
service mysqld stop(停止服務)
mysqladmin –u root –p test shutdown(停止mysql)

8)
設置其他機器訪問mysql
insert into user(Host,User,Password) values('192.168.117.54','test',password('test'));
flush privileges;

9)
# cp support-files/my-medium.cnf /etc/my.cnf
(使用mysql其他模板覆蓋默認模板)

<!--新Google 468*60橫幅廣告開始-->

<script type="text/javascript"><!-- google_ad_client = "pub-7343546549496470"; /* 468x60, 創建于 08-8-6 */ google_ad_slot = "7368701459"; google_ad_width = 468; google_ad_height = 60; // --></script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>

<!--新Google 468*60橫幅廣告結束-->

<!--新Google 468x15 橫鏈接單元開始-->

<script type="text/javascript"><!-- google_ad_client = "pub-7343546549496470"; /* 468x15 橫鏈接單元 */ google_ad_slot = "5785741422"; google_ad_width = 468; google_ad_height = 15; // --></script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>

<!--新Google 468x15 橫鏈接單元結束-->

轉自【http://jythoner.javaeye.com/blog/277778】

在Linux上安裝MySQL 5.0


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 金华市| 浪卡子县| 镇江市| 东山县| 肥乡县| 仙游县| 涞源县| 和静县| 中阳县| 元氏县| 屏山县| 莱州市| 隆回县| 常熟市| 五原县| 闽侯县| 朝阳区| 涟源市| 卓资县| 松阳县| 武功县| 海门市| 许昌市| 南雄市| 南华县| 肃北| 光山县| 麻城市| 广东省| 松溪县| 灵璧县| 通许县| 卫辉市| 陈巴尔虎旗| 宜君县| 昆明市| 阜宁县| 贡嘎县| 陆川县| 宿迁市| 金昌市|