導航

          <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

          主站蜘蛛池模板: 上犹县| 吴桥县| 浦县| 闽清县| 育儿| 伊川县| 两当县| 保靖县| 浦县| 平山县| 山东| 图木舒克市| 琼中| 普洱| 格尔木市| 车致| 呈贡县| 石嘴山市| 宁强县| 花垣县| 台州市| 葫芦岛市| 石河子市| 汨罗市| 专栏| 绩溪县| 那曲县| 六盘水市| 秭归县| 略阳县| 海城市| 新郑市| 普洱| 洮南市| 桂阳县| 略阳县| 尼勒克县| 高密市| 资兴市| 海丰县| 沅陵县|