1 CentOS 7 安装图形界面
# yum groupinstall "KDE Plasma Workspaces"
# yum groupinstall "GNOME Desktop"
# startx
2 CentOS 7 安装mysql
#yum install mysql #yum install mysql-server #yum install mysql-devel
# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm # rpm -ivh mysql-community-release-el7-5.noarch.rpm # yum install mysql-community-server
# service mysqld restart
设置密码
mysql> set password for 'root'@'localhost' =password('password'); Query OK, 0 rows affected (0.00 sec) mysql>
mysql配置文件为/etc/my.cnf
最后加上编码配置
[mysql]
default-character-set =utf8
把在所有数据库的所有表的所有权限赋值给位于所有IP地址的root用户。
mysql> grant all privileges on *.* to root@'%'identified by 'password';
如果是新用户而不是root,则要先新建用户
mysql>create user 'username'@'%' identified by 'password';