Mysql配置

一、步骤

  1. 安装:mysqld -install
  2. 1、在命令行中输入“mysql -uroot -p”(不输入密码),回车即可进入数据库。
  3. 2、执行,“use mysql;”使用mysql数据库。
  4. 3、执行,“update user set password=PASSWORD("rootadmin") where user='root';”(修改root的密码)

二、my.ini文件:

  1. **# For advice on how to change settings please see**
  2. **# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html**
  3. **# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the**
  4. **# *** default location during install, and will be replaced if you**
  5. **# *** upgrade to a newer version of MySQL.**
  6. **[client]**
  7. **port=3306**
  8. **default-character-set=utf8**
  9. **[mysqld]**
  10. **port=3306**
  11. **character_set_server=utf8**
  12. **# Remove leading # and set to the amount of RAM for the most important data**
  13. **# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.**
  14. **#innodb_buffer_pool_size = 128M**
  15. **# Remove leading # to turn on a very important data integrity option: logging**
  16. **# changes to the binary log between backups.**
  17. **# log_bin**
  18. **# These are commonly set, remove the # and set as required.**
  19. **basedir = C:/server/server/sql/mysql**
  20. **datadir = C:/server/server/sql/mysql/data**
  21. **#port = 3306**
  22. **#server_id = 1**
  23. **#default-storage-engine=INNODB**
  24. **# Remove leading # to set options mainly useful for reporting servers.**
  25. **# The server defaults are faster for transactions and fast SELECTs.**
  26. **# Adjust sizes as needed, experiment to find the optimal values.**
  27. **#join_buffer_size = 128M**
  28. **#sort_buffer_size = 2M**
  29. **#read_rnd_buffer_size = 2M **
  30. **sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES **
  31. **[WinMySQLAdmin]**

C:\server\server\sql\mysql\binmysqld.exe