登录到命令行 修改密码: 格式:mysql> set password for 用户名@localhost = password('新密码'); 例子:mysql> set password for root@localhost = password('123'); 拷贝my-default.ini 到bin/文件夹,并重命名my.ini 即可
应用范围:可以在命令行直接使用密码来进行远程连接和远程拉取文件. 使用前提:对于未连接过的主机.而又不输入yes进行确认,需要进行sshd服务的优化: # vim /etc/ssh/ssh_config StrictHostKeyChecking no # vim /etc/ssh/sshd_config GSSAPIAuthentication no UseDNS no # service sshd restart sshpass 命令的安装: # yum -y install sshpa
最近测试工作做的比较多因此时常要创建一些控制台类型的应用程序.因为程序有不同的参数开关,需要在程序启动的时候通过命令行来给程序传递各种开关和参数.直接操作args有些不方便,所以就写了个解析参数的小工具来处理各种参数. 参数实体: public class CommandLineArgument { List<CommandLineArgument> _arguments; int _index; string _argumentText; public CommandLineArgument
因工作中要对数据打包,顺便研究了下WinRAR的命令行模式,自己写了些例子,基本用法如下: 测试压缩文件准备:文件夹test_data,内部包含子文件夹,分别存放了一些*.log和*.txt文件. 测试代码如下: rem 压缩全部文件,按类型压缩,zip打包 WinRAR.exe a num_all.zip .\test_data\ WinRAR.exe a num_txt.zip .\test_data\num*.txt WinRAR.exe a num_log.zip .\test_data