---
title: "mysql common used command"
author: "zhoumin007"
date: "2008-03-29T12:20:31Z"
tags: ["MySQL"]
slug: "mysql-common-used-command"
draft: false
lastmod: "2008-03-29T12:20:31Z"
id: 177571
url: "https://zhoumin007.iteye.com/blog/177571"
---

1:connect: mysql -u root -p

 

2:change password:

use mysql  
update user set Password=password('newpassword') where User='root';  
flush privileges;

 

3:create database discuz;

 

4:grant all privileges on discuz.* to discuz@localhost identified by '123456';