首页 > 代码库 > Centos 7下mysql的安装与配置 (未完成)

Centos 7下mysql的安装与配置 (未完成)

vim /var/log/mysqld.log   

A temporary password is generated for root@localhost: yqtAhsIw/9MI

mysql -u root -p

password:yqtAhsIw/9MI

create user ‘aa01‘@‘192.168.100.140‘ identified by ‘123456‘; //给192.168.100.140创建用户,即创建的用户只能在192.168.100.140上登录
create database xyq; //创建xyq数据库
grant all privileges on xyq.* to ‘aa01‘@‘192.168.100.140‘; //给某个用户加上指定数据库的权限,*代表所有的表

 

mysql_install_db --datadir=/var/lib/mysql  ///初始化数据库

Centos 7下mysql的安装与配置 (未完成)