yum安装mysql

安装mysql客户端:

#  yum install mysql

安装mysql 服务器端:

# yum install mysql-server
# yum install mysql-devel

启动:

# /etc/init.d/mysqld start

开机启动:

# chkconfig -add mysqld             //增加
# chkconfig --list | grep mysql*    //查看

停止:

# service mysqld stop

忘记密码:

# service mysqld stop
# mysqld_safe --user=root --skip-grant-tables
# mysql -u root
> use mysql
> update user set password=password("new_pass") where user="root";
> flush privileges;  

数据目录:

/var/lib/mysql/     //数据库目录
/usr/share/mysql    //配置文件

卸载:

# yum -y remove mysql*
posted @ 2015-05-14 14:14  thomas_blog  阅读(192)  评论(0编辑  收藏  举报