1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | # For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. basedir = D: /MySQL datadir = D: /MySQL/data port = 3306 # server_id = ..... character- set -server = utf8 collation-server = utf8_general_ci # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M sql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES |
Batch啟動檔
1 2 3 | cd bin mysqld -- install net start mysql |
Batch停止檔
1 2 | net stop mysql bin\mysqld --remove |
設定密碼
1 | mysqladmin -u root password YOUR-PASSWORD |
修改密碼
1 2 3 4 5 | cd bin rem mysqladmin -u root password '123456' mysql -u root -p rem use mysql rem update user set password=PASSWORD( '123456' ) where user= 'root' ; |
備份資料庫 - 方法1
1 2 | cd bin mysqldump test -u root -p > d:\ test .sql.bak |
備份資料庫 - 方法2
1 | mysqldump -u username -p database --single-transaction >dump.sql |
還原資料庫
1 2 | cd bin mysql test -u root -p < d:\ test .sql.bak |
1 | mysqld -- install |
1 | mysqld -- install -manual |
沒有留言:
張貼留言