In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly gives you a brief introduction to the installation of mysql5.6.15 through CentOS6.3 source code tutorials, relevant professional terms can be checked online or find some related books to supplement, here we will not dabble in, let's go straight to the topic of mysql5.6.15 installation tutorials through CentOS6.3 source code, hoping to bring you some practical help.
Starting with version 5.5, mysql is no longer compiled with. / configure, but with the cmake compiler http://dev.mysql.com/doc/refman/5.6/en/source-configuration-options.html
Download address of mysql-5.6.16.tar.gz source package:
Wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.15.tar.gz
My mysql directory configuration is as follows:
Installation path: / usr/local/mysql
Database path: / data/mysql
Source package location: / usr/software
Preparation: install the basic dependency package, first install cmake, automake, autoconf
In addition, the packages that need to be installed at least for MySQL 5.6.x are: bison,gcc, gcc-c++, ncurses-devel
[root@localhost ~] # yum install cmake make-y
[root@localhost ~] # yum install gcc gcc-c++ autoconf bison automake zlib fiex libxml ncurses-devel libmcrypt libtool-ltdl-devel*-y
[root@localhost ~] # cp / root/mysql-5.6.15.tar.gz / usr/software/
[root@localhost ~] # cd / usr/software
Start compilation and installation
[root@localhost ~] # tar-zxvf mysql-5.6.15.tar.gz
[root@localhost ~] # cd mysql-5.6.15
[root@localhost ~] # cmake-DCMAKE_INSTALL_PREFIX=/usr/local/mysql\
-DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock\
-DDEFAULT_CHARSET=utf8\
-DDEFAULT_COLLATION=utf8_general_ci\
-DWITH_EXTRA_CHARSETS:STRING=utf8,gbk\
-DWITH_INNOBASE_STORAGE_ENGINE=1\
-DWITH_READLINE=1\
-DENABLED_LOCAL_INFILE=1\
-DMYSQL_DATADIR=/data/mysql/\
-DMYSQL_USER=mysql\
-DMYSQL_TCP_PORT=3306
[root@localhost] # make & & make install
A simple translation of the English document on the official website of mysql
The MyISAM, MERGE, MEMORY, and CSV engines are mandatory (always compiled into the server) and need not be installed explicitly. (note: the default database engines supported by mysql are MyISAM, MERGE, MEMORY, CSV, which need not be declared at compile time.)
So the above compilation conditions omit the following two lines
-DWITH_MYISAM_STORAGE_ENGINE=1\
-DWITH_MEMORY_STORAGE_ENGINE=1\
But INNODB must be installed declaratively, so this line is added.
-DWITH_INNOBASE_STORAGE_ENGINE=1\
Check whether the users and groups of mysql.mysql exist
[root@localhost ~] # cat / etc/passwd | grep mysql
Mysql:x:501:503::/home/mysql:/bin/bash
[root@localhost ~] # cat / etc/group | grep mysql
Mysql:x:503:
No, OK executes the following two lines of commands (otherwise skip this step)
[root@localhost ~] # groupadd mysql # add mysql user group
[root@localhost ~] # useradd mysql-g mysql-s / sbin/nologin # add mysql user
The following commands with red fonts are very very and must be executed
[root@localhost ~] # cd / usr/local/mysql
[root@localhost] # chown mysql.mysql-R. # assign the mysql directory to the mysql user to execute
[root@localhost] # chown mysql.mysql-R / data/mysql
[root@localhost ~] # cp support-files/my-default.cnf / etc/my.cnf # mysql configuration file
[root@localhost ~] # chmod 755 scripts/mysql_install_db # gives mysql_install_db execution permission
The following command configures mysql startup and self-startup
[root@localhost] # scripts/mysql_install_db-user=mysql-basedir=/usr/local/mysql-datadir=/data/mysql/
Output the following information:
2013-12-12 13:58:23 25913 [Note] InnoDB: The InnoDB memory heap is disabled
2013-12-12 13:58:23 25913 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2013-12-12 13:58:23 25913 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-12-12 13:58:23 25913 [Note] InnoDB: Using Linux native AIO
2013-12-12 13:58:23 25913 [Note] InnoDB: Not using CPU crc32 instructions
2013-12-12 13:58:23 25913 [Note] InnoDB: Initializing buffer pool, size = 128.0m
2013-12-12 13:58:23 25913 [Note] InnoDB: Completed initialization of buffer pool
2013-12-13:58:23 25913 [Note] InnoDB: The first specified data file. / ibdata1 did not exist: a new database to be created!
2013-12-12 13:58:23 25913 [Note] InnoDB: Setting file. / ibdata1 size to 12 MB
2013-12-12 13:58:23 25913 [Note] InnoDB: Database physically writes the file full: wait...
2013-12-12 13:58:23 25913 [Note] InnoDB: Setting logfile. / ib_logfile101 size to 48 MB
2013-12-12 13:58:24 25913 [Note] InnoDB: Setting logfile. / ib_logfile1 size to 48 MB
2013-12-12 13:58:24 25913 [Note] InnoDB: Renaming logfile. / ib_logfile101 to. / ib_logfile0
2013-12-13:58:24 25913 [Warning] InnoDB: New log files created, LSN=45781
2013-12-12 13:58:24 25913 [Note] InnoDB: Doublewrite buffer not found: creating new
2013-12-12 13:58:24 25913 [Note] InnoDB: Doublewrite buffer created
2013-12-12 13:58:24 25913 [Note] InnoDB: 128rollback segment (s) are active.
2013-12-12 13:58:24 25913 [Warning] InnoDB: Creating foreign key constraint system tables.
2013-12-12 13:58:24 25913 [Note] InnoDB: Foreign key constraint system tables created
2013-12-12 13:58:24 25913 [Note] InnoDB: Creating tablespace and datafile system tables.
2013-12-12 13:58:24 25913 [Note] InnoDB: Tablespace and datafile system tables created.
2013-12-12 13:58:24 25913 [Note] InnoDB: Waiting for purge to start
2013-12-12 13:58:24 25913 [Note] InnoDB: 5.6.15 started; log sequence number 0
2013-12-12 13:58:26 25913 [Note] Binlog end
2013-12-12 13:58:26 25913 [Note] InnoDB: FTS optimize thread exiting.
2013-12-12 13:58:26 25913 [Note] InnoDB: Starting shutdown...
2013-12-12 13:58:27 25913 [Note] InnoDB: Shutdown completed; log sequence number 1625977
OK
Filling help tables...2013-12-12 13:58:27 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use-explicit_defaults_for_timestamp server option (see documentation for more details).
2013-12-12 13:58:27 25936 [Note] InnoDB: The InnoDB memory heap is disabled
2013-12-12 13:58:27 25936 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2013-12-12 13:58:27 25936 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-12-12 13:58:27 25936 [Note] InnoDB: Using Linux native AIO
2013-12-12 13:58:27 25936 [Note] InnoDB: Not using CPU crc32 instructions
2013-12-12 13:58:27 25936 [Note] InnoDB: Initializing buffer pool, size = 128.0m
2013-12-12 13:58:27 25936 [Note] InnoDB: Completed initialization of buffer pool
2013-12-12 13:58:27 25936 [Note] InnoDB: Highest supported file format is Barracuda.
2013-12-12 13:58:27 25936 [Note] InnoDB: 128rollback segment (s) are active.
2013-12-12 13:58:27 25936 [Note] InnoDB: Waiting for purge to start
2013-12-12 13:58:27 25936 [Note] InnoDB: 5.6.15 started; log sequence number 1625977
2013-12-12 13:58:27 25936 [Note] Binlog end
2013-12-12 13:58:27 25936 [Note] InnoDB: FTS optimize thread exiting.
2013-12-12 13:58:27 25936 [Note] InnoDB: Starting shutdown...
2013-12-12 13:58:29 25936 [Note] InnoDB: Shutdown completed; log sequence number 1625987
OK
To start mysqld at boot time you have to copy
Support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER!
To do so, start the server, then issue the following commands:
/ usr/local/mysql/bin/mysqladmin-u root password' new-password'
/ usr/local/mysql/bin/mysqladmin-u root-h ziteng26 password' new-password'
Alternatively you can run:
/ usr/local/mysql/bin/mysql_secure_installation
Which will also give you the option of removing the test
Databases and anonymous user created by default. This is
Strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
Cd. ; / usr/local/mysql/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
Cd mysql-test; perl mysql-test-run.pl
Please report any problems with the. / bin/mysqlbug script!
The latest information about MySQL is available on the web at
Http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
New default config file was created as / usr/local/mysql/my.cnf and
Will be used by default by the server when you start it.
You may edit this file to change server settings
WARNING: Default config file / etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
-- defaults-file argument to mysqld_safe when starting the server
[root@localhost ~] # cp support-files/mysql.server / etc/init.d/mysqld
[root@localhost ~] # chmod 755 / etc/init.d/mysqld
Check to see if the mysqld service is set to boot
[root@localhost ~] # chkconfig-- list | grep mysqld
Set to boot
[root@localhost ~] # chkconfig mysqld on
Starting the mysql database will output a series of useful information telling you how to initialize mysql next.
[root@CentOS mysql] # service mysqld start
According to the above English, let's initialize the password of administrator root
[root@localhost] # / usr/local/mysql/bin/mysqladmin-u root password' yourpassword'
Here yourpassword is set to manager
As we all know, there are two types of accounts in mysql, namely localhost and%. The former restricts local connection to mysql, while the latter can be used for other machines to connect to mysql remotely. Finally, the problem of account login is dealt with, so that the root account password can be used by local and remote connections.
[root@localhost ~] # / usr/local/mysql/bin/mysql-u root-p # after typing the command, the screen will prompt for the password and enter the yourpassword set in the previous step
Delete records with empty root password
Mysql > use mysql
Mysql > delete from user where password=''
Mysql > flush privileges
Configure mysql to allow root remote login # login
Mysql > grant all privileges on. To root@'%' identified by "manager"
Mysql > flush privileges
Mysql > select User,Password,Host from user
If the above command is executed successfully
Mysql > quit
Through the CentOS6.3 source code installation mysql5.6.15 tutorial to tell you here, for other related issues you want to know can continue to pay attention to our industry information. Our section will capture some industry news and professional knowledge to share with you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.