Centos下登陆MySQL
Wordpress初步配置完成,网页上线啦:raccoon&bunny的博客
但是在Centos终端操纵mysql时却出了问题:
[root@iZj6c65tsjaqwrt1kox5t9Z /]# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
原来是没有输入用户和密码,输入下面的命令,-u后面的root换成自己的用户名,-p后面的换成自己的密码,即可:
[root@iZj6c65tsjaqwrt1kox5t9Z /]# mysql -uroot -p123456
接着就进入了mysql界面了。
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
MySQL中的一些基础操作
1.查询当前库
注意语句后面要加上英文下的分号;
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| sql_47_56_