mysql使用简介
mysql如何查看my.cnf的位置
命令行输入:
./mysqld --verbose --help | grep -A 1 'Default options'
Default options are read from the following files in the given order:
/etc/my.cnf
修改Mysql访问权限
use mysql
select Host,User,password from user;
grant all on *.* to root@'%' identified by '密码';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;
root表示用户名,主机名是%表示全部
flush privileges; //更新
mysql客户端连接数据库
mysql -h127.0.0.1 -u用户名 -p密码 -P端口
显示是否支持中文
show variables like '%char%';