Home > Database > Mysql Tutorial > body text

rpm安装配置mysql5.0过程_MySQL

WBOY
Release: 2016-06-01 13:32:35
Original
1022 people have browsed it

bitsCN.com

rpm安装配置mysql5.0过程

 

MySql的安装:

  先检查是否已经安装了:rpm -qa |grep mysql   ---两个都检查下   

                        rpm -qa |grep MySQL

  若安装有可删除:rpm -e ******

 

1、安装前准备:mkdir usr/mysql

   cd进入该目录,上传安装包到/usr/mysql目录下

2、安装:

   rpm -ivh MySQL-server-5.0.16-0.i386.rpm

   rpm -ivh MySQL-elient-5.0.16-0.i386.rpm

3、验证安装是否成功:

   rpm -qa |grep mySQL

 

启动mysql的方法:

1、  service mysql start

2、  /etc/rc.d/init.d/mysql    start

 

安装目录: /usr/mysql

数据库的目录:   /var/lib/mysql

配置文件的目录: /usr/share/mysql

相关命令:        /usr/bin/

启动时的脚本:    /etc/rc.d/init.d/

 

设置密码方法:

              /usr/share/mysqladmin -u root password '123456'

设置完后 #MySQL -u -root -p

        > show databases;

        > use mysql;

        >show tables;

        >quit;---------------从数据库中退出

进不去时:update MySQL set host = '%' where host = 'localhost'

          grant all privileges on *.* to root@"%"

          flush privileges

 

常见mysql命令:

1、重启mysql服务:#server mysql restart

2、查看mysql是否安装:#rpm -qa |grep mysql

3、卸载mysql:#rpm -e mysql-server;

              #rpm -e mysql-client

4、其他命令:#mysqladmin version; 

             #mysqladmin status;

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!