首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

mysql 惯用语句

2013-11-08 
mysql 常用语句mysql bat 文件c:cd C:\Program Files\MySQL\MySQL Server 5.5\bin##for /f tokens2 deli

mysql 常用语句
mysql bat 文件

c:
cd C:\Program Files\MySQL\MySQL Server 5.5\bin
##for /f "tokens=2 delims=:" %%i in ('ipconfig ^|findstr /i "ip address"') do set ip=%%i
##echo %ip%
set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"
echo %ymd%

mysqldump -u a -pa pwvm > d:\pwvm__%ymd%_dump.sql
mysqldump -u a -pa monitor > d:\monitor_%ymd%_dump.sql
copy d:\pwvm__%ymd%_dump.sql \\10.10.55.140\140共享\db\dump
copy d:\monitor_%ymd%_dump.sql \\10.10.55.140\140共享\db\dump


-----------------------
创建用户
CREATE USER 'a'@'%' IDENTIFIED BY 'a';
GRANT all ON *.* TO 'a'@'%';
CREATE SCHEMA `pwvm` DEFAULT CHARACTER SET utf8 ;
CREATE SCHEMA `monitor` DEFAULT CHARACTER SET utf8 ;


SET PASSWORD FOR 'root'@'localhost' = PASSWORD("a");


------------------------------------------------------
赋权限
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;

FLUSH   PRIVILEGES;


热点排行