The source of this article: http://www.cnblogs.com/wy123/p/6815049.html
The latest in learning MySQL, pure novice, not much understanding of Linux, because is the latest version of the download mysql (MySQL5.7.18) binary package, CentOS7.2 under test installation, easy to toss later.
Approximate steps are as follows, installation and deletion repeatedly toss several times, according to the following steps, there should be no problem.
Also did not imagine the complexity, most of the steps are referred to the internet, according to do is, error, try more, more information.
Operating system version
Create MySQL groups and users
Download the latest version of MySQL 5.7.182 package and upload it to the server's usr/local directory
Unzip the MySQL binary package
The following is the file information after the decompression and renaming the folder
Change which groups and users belong to
The contents of the MySQL file included after decompression
View the contents of the Support-files folder and discover that there is no my_default.cnf default profile, and if there is no default profile, you will need to manually create a MY_DEFAULT.CNF profile
From the Internet to find a configuration file, such as, upload to the Supp-files folder, of course, this configuration file can be modified according to their needs
# for advice The change settings see# http://dev.mysql.com/doc/refman/5.7/en/ server-configuration-defaults.html# * * * does not EDIT the this FILE. It's a template which'll be copied to the# * * * default location during install, and would be replaced if you# * * * Upgrade To a newer version of MySQL. [Mysqld]sql_mode=no_engine_substitution,strict_trans_tables # General configuration Options basedir =/usr/local/mysqldatadir =/usr/local/ Mysql/dataport = 3306socket =/var/run/mysqld/mysqld.sockcharacter-set-server=utf8back_log = 300max_connections = 3000max_connect_errors = 50table_open_cache = 4096max_allowed_packet = 32m#binlog_cache_size = 4Mmax_heap_table_size = 128mread_rnd_buffer_size = 16msort_buffer_size = 16mjoin_buffer_size = 16mthread_cache_size = 16query_cache_size = 128mquery_cache_limit = 4mft_min_word_len = 8thread_stack = 512ktransaction_isolation = REPEATABLE-READtmp_table_size = 128m#log-bin=mysql-binlong_query_time = 6server_id=1innodb_buffer_pool_size = 1ginnodb_thread_concurrency = 16innOdb_log_buffer_size = 16minnodb_log_file_size = 512minnodb_log_files_in_group = 3innodb_max_dirty_pages_pct = 90innodb _lock_wait_timeout = 120innodb_file_per_table = On[mysqldump]quickmax_allowed_packet = 32M[mysql] No-auto-rehashdefault-character-set=utf8safe-updates[myisamchk]key_buffer = 16msort_buffer_size = 16Mread_buffer = 8mwrite_buffer = 8m[mysqlhotcopy]interactive-timeout[mysqld_safe]open-files-limit = 8192[client]/bin/bash:q: Command not Found
as follows, upload the above default profile to the Support-files folder
Registering and initializing the MySQL service
This point compared to the pit, the online tutorials are mostly mysql_install_db way to install, this step is also encountering the most problems, tossing for a long time, but mysql_install_db command is not recommended, but also prompted to use Mysqld to install
In the installation of MySQL 5.7.18 is also a variety of error, after a variety of attempts, using the following naming method installation, as long as there is no error, warning message warning ignore it first
Bin/mysqld--initialize-insecure--user=mysql--basedir=/usr/local/mysql/--datadir=/usr/local/mysql/data/
Copy the above my_default.cnf and mysql.server configuration files to the ETC directory, before copying the file to the ETC directory, where it prompts whether to overwrite, enter Y overlay
Start the MySQL service
Connect to MySQL, default no password, direct enter after connecting to MySQL
Modify the root password of MySQL
To modify a remote access
Restart MySQL Service
MySQL can be used locally at this time
Testing remote connections
Linux MySQL5.7.18 Binary Package installation (no default profile my_default.cnf)