学Java,学到了JDBC,需要安装MySQL来练习。
访问MySQL官网,找到“DOWNLOADS” -> “MySQL Community (GPL) Downloads »” -> “MySQL Community Server”,然后选择系统和MySQL版本,最后点击“No thanks, just start my download.”,然后MySQL就会自动下载。这里我下载的是msi安装包。
安装过程不再赘述。
后来,需要修改MySQL配置文件,打开MySQL安装目录,并没有发现配置文件,隐藏文件也没有。
在命令行中输入
Shell
mysql --help
1mysql--help
在显示的帮助文档中有这样一条提示
Default options are read from the following files in the given order:
C:\Windows\my.ini C:\Windows\my.cnf C:\my.ini C:\my.cnf C:\Program Files\MySQL\MySQL Server 5.7\my.ini C:\Program Files\MySQL\MySQL Server 5.7\my.cnf
1
2Defaultoptionsarereadfromthefollowingfilesinthegivenorder:
C:\Windows\my.iniC:\Windows\my.cnfC:\my.iniC:\my.cnfC:\ProgramFiles\MySQL\MySQLServer5.7\my.iniC:\ProgramFiles\MySQL\MySQLServer5.7\my.cnf
找了对应位置,也没有。