mySQL使用

Ubuntu 下安装mySQL,可以直接在终端输入:

sudo apt-get intsall mysql-service

sudo apt-get install mysql-client

安装完成后,使用:

mysql -u root -p

设置密码并进去mysql.

如果想要添加新用户,使用:

grant all on *.* to user@localhost identified by "";

user为用户名,“”里面为密码,可以为空。

如果在mysql中输入出错,可以使用/c结束,当缺少引号的错误,使用'\c结束。

其余具体操作,请查看:

http://dev.mysql.com/doc/refman/5.1/zh/tutorial.html#connecting-disconnecting

posted on 2012-04-29 10:55  leohxj  阅读(141)  评论(0编辑  收藏  举报

导航