導航

          <2010年12月>
          2829301234
          567891011
          12131415161718
          19202122232425
          2627282930311
          2345678

          隨筆分類

          隨筆檔案

          統計

          留言簿(1)

          DB

          Others

          QA

          Tech Website

          閱讀排行榜

          評論排行榜

          Install MySQL5.1.25 on Ubuntu

                Ubuntu crashed tonight which urged me to reintsall the system and MySQL. Damn!

          -------------------main procedure-------------------

          shell> groupadd mysql

          shell> useradd -g mysql mysql

          shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -

          shell> cd mysql-VERSION

          shell> ./configure --prefix=/usr/local/mysql

          shell> make

          shell> make install

          shell> cp support-files/my-medium.cnf /etc/my.cnf

          shell> cd /usr/local/mysql

          shell> bin/mysql_install_db --user=mysql

          shell> chown -R root  .

          shell> chown -R mysql var

          shell> chgrp -R mysql .

          shell> bin/mysqld_safe --user=mysql &

          ------------------initilize the password ------------------
          #set the password for root
          shell> mysql -u root
          mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');

          #creat user mysql and set its password '123456'
          CREATE USER mysql@localhost IDENTIFIED BY '123456';
          GRANT ALL ON db_name.* TO mysql@localhost


          References: http://dev.mysql.com/doc/refman/5.1/zh/index.html

          posted on 2010-12-29 00:20 XXXXXX 閱讀(334) 評論(0)  編輯  收藏 所屬分類: Linux&Unix

          主站蜘蛛池模板: 张家口市| 临安市| 什邡市| 赣榆县| 宿松县| 台北县| 鸡东县| 阳曲县| 滨海县| 文登市| 兴仁县| 东乡| 疏勒县| 辽宁省| 隆尧县| 保定市| 延边| 噶尔县| 平远县| 乐陵市| 彩票| 蓝田县| 建瓯市| 林甸县| 姚安县| 青冈县| 扎囊县| 蒙城县| 临洮县| 同江市| 平顶山市| 宽甸| 慈利县| 囊谦县| 邳州市| 平原县| 饶平县| 定安县| 马关县| 图木舒克市| 中卫市|