1,进入mysql,终端中输入 mysql -u 用户名 -p .enter键后,提示输入密码. 2,执行grant all privileges on xxxdb.* to usertest@"%" identified by "passdtest"; 增加用户usertest,密码为passdtest.其对数据库xxxdb有所有权限.可以外网访问. 3,show databases; 显示此用户下的数据库 4,select host,user from m…
Linux下MySQL的简单操作 更改mysql数据库root的密码 首次进入数据库是不用密码的: [root@localhost ~]# /usr/local/mysql/bin/mysql -uroot Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.1.40-log MySQL Community Server (GPL) Typ…