私信  •  关注

nos

nos 最近回复了

当你打字的时候 mysql -u root -p ,则通过本地unix套接字连接到mysql服务器。

不管你给多少钱, 'bill'@'%' 只匹配TCP/IP连接就够奇怪了。

如果要授予对本地unix套接字的访问权限,则需要授予“bill”@“localhost”特权,奇怪的是,这与“bill”@“127.0.0.1”不一样。

您还可以使用tcp/ip与mysql命令行客户机连接,以匹配您已经授予的特权,例如run mysql -u root -p -h 192.168.1.123 或者你的盒子里有哪个本地IP地址。

5 年前
回复了 nos 创建的主题 » 如何将命令git output设置为批处理文件中的变量

括号在 --format=%(refname) 导致外括号出现问题,因此需要对其进行转义,这是通过 ^ 性格。

 for /f %i in ('git for-each-ref refs/tags --sort=-taggerdate --format=%^(refname^)' ) do set TAG=%i

注意1:帮自己一个忙,使用git bash或powershell在windows上编写git脚本。

注2:根据您是从.bat fil运行批处理命令,还是在控制台中键入命令,有许多不同的情况,另请参见 Assign output of a program to a variable Escaping parentheses within parentheses for batch file

14 年前
回复了 nos 创建的主题 » mysql cast varchar,格式为“mm dd yyy”,输入日期[重复]

是的,有 str_to_date

mysql> select str_to_date("03/02/2009","%d/%m/%Y");
+--------------------------------------+
| str_to_date("03/02/2009","%d/%m/%Y") |
+--------------------------------------+
| 2009-02-03                           |
+--------------------------------------+
1 row in set (0.00 sec)