首页 > 代码库 > linux mysql

linux mysql

mysql_install_db datadir=/var/lib/mysql
ALTER USER ‘root‘@‘localhost’ identified by ‘123456‘
show databases;         //查看mysql-server有那些数据库
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‘;
VAR/LOG
VAR/MYSQL

linux mysql