mysql的删除、安装步骤

    技术2022-05-11  45

    mysql的卸载: 1 rpm -qa |grep mysql   rpm -e mysql* 2 到源代码所在目录 gmake uninstall

    mysql4.0.20的安装步骤:

         shell> groupadd mysql     shell> useradd -g mysql mysql     shell> cd /usr/local     //shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -  tar xzvf /path/to/mysql-VERSION-OS.tar.gz -C .       shell> ln -s full-path-to-mysql-VERSION-OS mysql     shell> cd mysql     shell> scripts/mysql_install_db --user=mysql     shell> chown -R root  .     shell> chown -R mysql data     shell> chgrp -R mysql .     shell> bin/mysqld_safe --user=mysql &    自动运行MySQL

     在MySQL二进制包里面,有一个叫myslq.server的启动脚本程序。把它复制到/etc/rc.d/init.d目录里面:

     # cd /etc/rc.d/rc0.d # cp /usr/local/mysql/support-files/mysql.server mysql

     接着把它的属性改为“x”(executable,可执行)

     # chmod +x mysql

     #能够直接启动mysql客户端 cp /usr/local/mysql/bin/mysql  /usr/bin/

      #加入mysql的库  scp root@10.1.45.195#36000:/lib/*mysql* /lib/

      #启动服务: /etc/rc.d/rc0.d/mysql start|stop|restart          #源码安装  CFLAGS="-O6 -mpentiumpro -fomit-frame-pointer"CXX=gccCXXFLAGS="-O6 -mpentiumpro -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static --disable-shared --with-extra-charsets=gb2312 --without-debugmake allmake install

    groupadd mysqluseradd -g mysql mysql

    chmod -R 755 /usr/local/mysql/varchown -R mysql.mysql /usr/local/mysql/varchmod -R 755 /datachown -R mysql.mysql /data 


    最新回复(0)