Install MySQL5.6 in linux (RPM Mode) _ MySQL

Source: Internet
Author: User
Install MySQL5.6 in linux (RPM Mode)
1. prepare the corresponding download page for the installation file: http://dev.mysql.com/downloads/mysql/ Find the corresponding version and the desired file to download. if the downloaded file is a tar file, use tar to decompress the package on Oracle Edelivery. for example, v44331-01.zip # installation environment [root @ linux1 Mysql_src] # cat/etc/issueEnterprise Linux Enterprise Linux Server release 5.5 (Carthage) kernel/r on an/m # Source file path [root @ linux1 Mysql_src] # pwd/Mysql_src [root @ linux1 Mysql_src] # unzip V44331-01.zip Archive: V44331-01.zip extracting: MySQL-embedded-advanced-5.6.17-1.rhel5.i386.rpm extracting: mySQL-test-adva Nced-5.6.17-1.rhel5.i386.rpm extracting: MySQL-shared-advanced-5.6.17-1.rhel5.i386.rpm # MySQL shared library extracting: MySQL-devel-advanced-5.6.17-1.rhel5.i386.rpm # MySQL library and header file extracting: MySQL-client-advanced-5.6.17-1.rhel5.i386.rpm # MySQL client program extracting: MySQL-server-advanced-5.6.17-1.rhel5.i386.rpm # MySQL server program extracting: mySQL-shared-compat-advanced-5.6.17-1.rhel5.i386.rpm # RHEL compatible package extracting: R EADME.txt 2. default MySQL installation path Directory Contents of Directory/usr/bin Client programs and scripts/usr/sbin The mysqld server/var/lib/mysql Log files, databases/usr/share/info Manual in Info format/usr/share/man Unix manual pages/usr/include/mysql Include (header) files/usr/lib/mysql Libraries/usr/share/mysql Miscellaneous support files, including error messages, character set files, sample configuration Files, SQL for database installation/usr/share/SQL-plugin Benchmarks 3. install MySQL [root @ linux1 Mysql_src] # rpm-ivh MySQL-server-advanced-5.6.17-1.rhel5.i386.rpmPreparing... ######################################## ### [100%] 1: mySQL-server-advanced ################################### ####### [100%] 17:26:59 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. please use -- explici T_defaults_for_timestamp server option (see documentation for more details ). 17:26:59 6524 [Note] InnoDB: using mutexes to ref count buffer pool pages ........................... 17:27:06 6558 [Note] InnoDB: FTS optimize thread exiting.2014-04-15 17:27:06 6558 [Note] InnoDB: Starting shutdown... 17:27:08 6558 [Note] InnoDB: Shutdown completed; log sequence number 1625 987A random password has been set for the MySQL root USER! You will find that password in '/root /. mysql_secret '. you must change that password on your first connect, no other statement but 'set password' will be accepted. see the manual for the semantics of the 'password expired' flag. also, the account for the anonymous user has been removed. in addition, you can run:/usr/bin/mysql_secure_installation # Author: Leshami # Blog: http://blog.csdn.net/leshamiwhich Will also give you the option of removing the test database. this is stronugly recommended for production servers ............ omitted in the middle ................ new default config file was created as/usr/my. cnf andwill be used by default by the server when you start it. you may edit this file to change server settings [root @ linux1 Mysql_src] # rpm-ivh MySQL-client-advanced-5.6.17-1.rhel5.i386.rpmPreparing... ######################################## ### [100%] 1: mySQL-client-advanced ################################### ####### [100%] [root @ linux1 Mysql_src] # rpm-ivh MySQL-devel-advanced-5.6.17-1.rhel5.i386.rpmPreparing... ######################################## ### [100%] 1: mySQL-devel-advanced ################################### ######## [100%] 4. initialize MySQL and its password [root @ linux1 Mysql_src] # service mysql startStarting MySQL .. [OK] [root @ linux1 Mysql_src] # more/root /. mysql_secret # The random password set for the root user at Tue Apr 15 17:27:05 2014 (local time): lyHfNb87EBXhJDe2 [root @ linux1 Mysql_src] # mysql-u root-pEnter password: welcome to the MySQL monitor. commands end with; or/g. your MySQL connection id is 2 Server version: 5.6.17-enterprise-defined cial-advancedmysql> set PASSWORD = PASSWORD ('mysql'); Query OK, 0 rows affected (0.01 sec) mysql> show databases; + -------------------- + | Database | + -------------------- + | information_schema | mysql | performance_schema | test | + -------------------- + 4 rows in set (0.03 sec) 5. allow remote login to mysql> use mysql; Database changedmysql> select host, user, password from user; + ------------------- + ------ + hosts + | host | user | password | + ------------------- + ------ + hosts + | localhost | root | * hosts | linux1.orasrv.com | root | * drivers | 127.0.0.1 | root | * AE207AEF7D22B37183E435AAE64CECF7102A2DB2 |:: 1 | root | * tables | + --------------------- + ------ + ----------------------------------------- + 4 rows in set (0.02 sec) mysql> update user set password = password ('mysql ') where user = 'root'; mysql> update user set host = '%' where user = 'root' and host = 'localhost'; mysql> flush privileges; mysql> exit 6. configure automatic startup [root @ linux1 Mysql_src] # chkconfig -- list mysqlmysql 0: off 1: off 2: on 3: on 4: on 5: on 6: off if not, use chkconfig mysql on to set automatic startup.

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.