Configure the MySQL 64-bit installation-free version in Windows

Source: Internet
Author: User

Configure the MySQL 64-bit installation-free version in Windows

Windows 7 64-bit MySQL 64-bit installation-free
Document category: Database
1. Download http://pan.baidu.com/s/1jGf5nUI
2. decompress the package to the D: \ MySQL folder (specified by the path) without Chinese characters. It is best to change it to Mysql.
3. Under D: \ MySQL, change the my-default.ini TO my. ini configuration file and change the content to the following:

******************** * # MySQL Server Instance Configuration File # Created # Generated by the MySQL Server Instance Configuration Wizard ### Installation Instructions # Created ### client section # Created ## The following options will be read by MySQL client applications. # Note that only client applications are shipped by MySQL are guaranteed # to read this section. if you want your own MySQL client program to # honor these values, you need to specify it as an option during the # MySQL client library initialization. # [client] port = 3306 [mysql] default-character-set = gbk # server section # partition # The following options will be read by the MySQL Server. make sure that # you have installed the server correctly (see above) so it reads this # file. # [mysqld] # The TCP/IP Port the MySQL Server will listen onport = 3306 # Path to installation directory. all paths are usually resolved relative to this. basedir = "D: \ MySQL" # Path to the database rootdatadir = "D: \ MySQL \ Data" [WinMySQLadmin] Server = "D: \ MySQL \ bin \ mysqld.exe "# The default character set that will be used when a new schema or table is # created and no character set is defineddefault-character-set = gbk # The default storage engine that will be used when create new tables whendefault-storage-engine = INNODB # Set the SQL mode to strictsql-mode = "STRICT_TRANS_TABLES, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION "# The maximum amount of concurrent sessions the MySQL server will # allow. one of these connections will be reserved for a user with # SUPER privileges to allow the administrator to login even if the # connection limit has been reached. max_connections = 100 # Query cache is used to cache SELECT results and later return them # without actual executing the same query once again. having the query # cache enabled may result in significant speed improvements, if your # have a lot of identical queries and rarely changing tables. see the # "Qcache_lowmem_prunes" status variable to check if the current value # is high enough for your load. # Note: In case your tables change very often or if your queries are # textually different every time, the query cache may result in a # slowdown instead of a performance improvement. query_cache_size = 0 # The number of open tables for all threads. increasing this value # increases the number of file descriptors that mysqld requires. # Therefore you have to make sure to set the amount of open files # allowed to at least 4096 in the variable "open-files-limit" in # section [mysqld_safe] table_cache = 256 # maximum size for internal (in-memory) temporary tables. if a table # grows larger than this value, it is automatically converted to disk # based table This limitation is for a single table. there can be used # of them. tmp_table_size = 26 M # How many threads we shoshould keep in a cache for reuse. when a client # disconnects, the client's threads are put in the cache if there aren't # more than thread_cache_size threads from before. this greatly reduces # the amount of thread creations needed if you have a lot of new # connections. (Normally this doesn't give a notable performance # improvement if you have a good thread implementation .) thread_cache_size = 8 # *** MyISAM Specific options # The maximum size of the temporary file MySQL is allowed to use while # recreating the index (during REPAIR, alter table or load data infile. # If the file-size wocould be bigger than this, the index will be created # through the key cache (which is slower ). myisam_max_sort_file_size = 100G # If the temporary file used for fast index creation wocould be bigger # than using the key cache by the amount specified here, then prefer the # key cache method. this is mainly used to force long character keys in # large tables to use the slower key cache method to create the index. myisam_sort_buffer_size = 52 M # Size of the Key Buffer, used to cache index blocks for MyISAM tables. # Do not set it larger than 30% of your available memory, as some memory # is also required by the OS to cache rows. even if you're not using # MyISAM tables, you shoshould still set it to 8-64 M as it will also be # used for internal temporary disk tables. key_buffer_size = 40 M # Size of the buffer used for doing full table scans of MyISAM tables. # Allocated per thread, if a full scan is needed. read_buffer_size = 64Kread_rnd_buffer_size = 256 K # This buffer is allocated when MySQL needs to rebuild the index in # REPAIR, OPTIMZE, ALTER table statements as well as in load data infile # into an empty table. it is allocated per thread so be careful with # large settings. sort_buffer_size = 256 K # *** INNODB Specific options *** innodb_data_home_dir = "E: \ Program Files \ MySQL \ Data \ INNODB \ "# Use this option if you have a MySQL server with InnoDB support enabled # but you do not plan to use it. this will save memory and disk space # and speed up some things. # skip-innodb # Additional memory pool that is used by InnoDB to store metadata # information. if InnoDB requires more memory for this purpose it will # start to allocate it from the OS. as this is fast enough on most # recent operating systems, you normally do not need to change this # value. show innodb status will display the current amount used. innodb_additional_mem_pool_size = 2 M # If set to 1, InnoDB will flush (fsync) the transaction logs to the # disk at each commit, which offers full ACID behavior. if you are # willing to compromise this safety, and you are running small # transactions, you may set this to 0 or 2 to reduce disk I/O to the # logs. value 0 means that the log is only written to the log file and # the log file flushed to disk approximately once per second. value 2 # means the log is written to the log file at each commit, but the log # file is only flushed to disk approximately once per second. innodb_flush_log_at_trx_commit = 1 # The size of the buffer InnoDB uses for buffering log data. as soon as # it is full, InnoDB will have to flush it to disk. as it is flushed # once per second anyway, it does not make sense to have it very large # (even with long transactions ). innodb_log_buffer_size = 1 M # InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and # row data. the bigger you set this the less disk I/O is needed to # access data in tables. on a dedicated database server you may set this # parameter up to 80% of the machine physical memory size. do not set it # too large, though, because competition of the physical memory may # cause paging in the operating system. note that on 32bit systems you # might be limited to 2-3.5G of user level memory per process, so do not # set it too high. innodb_buffer_pool_size = 77 M # Size of each log file in a log group. you shoshould set the combined size # of log files to about 25%-100% of your buffer pool size to avoid # unneeded buffer pool flush activity on log file overwrite. however, # note that a larger logfile size will increase the time needed for the # recovery process. innodb_log_file_size = 39 M # Number of threads allowed inside the InnoDB kernel. the optimal value # depends highly on the application, hardware as well as the OS # scheduler properties. A too high value may lead to thread thrashing. innodb_thread_concurrency = 8 ****************** ***

The focus is on the following configuration. The directory name of datadir must be data, and it seems that it must be data under the MySQL directory. Other directories have been created by myself, and the error 1067 has always occurred.

#Path to installation directory. All paths are usually resolved relative to this.basedir="d:\MySQL"#Path to the database rootdatadir="d:\MySQL\Data"

4. Add the following content to the windows environment variables to facilitate command line execution)
Create MYSQL_HOME = "d: \ MySQL ",
Add % MYSQL_HOME % \ bin to Path
5. Register mysql as a windows system service. The specific operation is to execute the following command in the command line:
Switch to the bin directory and execute mysqld-installYou must switch to the bin directory.

C:\Windows\system32>cd /

C:>d:

D:\cd Mysql\bin

D:\cd Mysql\bin>mysqld –install
Service successfully installed.

D: \ cd Mysql \ bin> net start mysql
MySQL service is starting.
The MySQL service has been started successfully.
''

6. After step 1 is successful, start mysql on the command line
C:> net start mysql
7. Change the root password to 111111.
Use mysqladmin

  mysqladmin -u root password “111111”

If the root user has set a password, use the following method:

  mysqladmin -u root password oldpass “newpass”

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.