linux MySQL5.6版本的安装配置过程
2022-11-12 09:30:33
内容摘要
这篇文章主要为大家详细介绍了linux MySQL5.6版本的安装配置过程,具有一定的参考价值,可以用来参考一下。
对此感兴趣的朋友,看看idc笔记做的技术笔记!从今年3月份开始mysql官
文章正文
这篇文章主要为大家详细介绍了linux MySQL5.6版本的安装配置过程,具有一定的参考价值,可以用来参考一下。
对此感兴趣的朋友,看看idc笔记做的技术笔记!
从今年3月份开始mysql官网开始发布相关的5.6系列的各个版本,对于mysql5.6系列的版本对一起的版本进行了全局性的细节性加强;个人感觉,以下是在虚拟机中配置的mysql5.6.10源码安装的过程分享记录下:[root@mysql5 ~]# groupadd mysql[root@mysql5 ~]# useradd -r -g mysql mysql[root@mysql5 ~]# lsanaconda-ks.cfg install.log install.log.syslog mysql-5.6.10.tar.gz[root@mysql5 ~]# cd /usr/local/[root@mysql5 local]# lsbin etc games include lib libexec sbin share src[root@mysql5 local]# cp /root/mysql-5.6.10.tar.gz /usr/local/[root@mysql5 local]# lltotal 34468drwxr-xr-x 2 root root 4096 Jan 27 2010 bindrwxr-xr-x 2 root root 4096 Jan 27 2010 etcdrwxr-xr-x 2 root root 4096 Jan 27 2010 gamesdrwxr-xr-x 2 root root 4096 Jan 27 2010 includedrwxr-xr-x 2 root root 4096 Jan 27 2010 libdrwxr-xr-x 2 root root 4096 Jan 27 2010 libexec-rw-r--r-- 1 root root 35174149 Apr 17 00:55 mysql-5.6.10.tar.gzdrwxr-xr-x 2 root root 4096 Jan 27 2010 sbindrwxr-xr-x 4 root root 4096 Apr 17 00:32 sharedrwxr-xr-x 2 root root 4096 Jan 27 2010 src[root@mysql5 local]# tar -zxvf mysql-5.6.10.tar.gz[root@mysql5 local]# cd mysql-5.6.10cmake .make && make install[root@mysql5 mysql-5.6.10]# chown -R mysql.mysql /usr/local/mysql[root@mysql5 mysql-5.6.10]#[root@mysql5 mysql-5.6.10]# cd /usr/local/mysql/scripts/[root@mysql5 scripts]# ./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/dataInstalling MySQL system tables...2013-04-17 01:26:58 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).2013-04-17 01:26:58 18715 [Note] InnoDB: The InnoDB memory heap is disabled2013-04-17 01:26:58 18715 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation2013-04-17 01:26:58 18715 [Note] InnoDB: Compressed tables use zlib 1.2.32013-04-17 01:26:58 18715 [Note] InnoDB: CPU does not support crc32 instructions2013-04-17 01:26:58 18715 [Note] InnoDB: Initializing buffer pool, size = 128.0M2013-04-17 01:26:58 18715 [Note] InnoDB: Completed initialization of buffer pool2013-04-17 01:26:58 18715 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!2013-04-17 01:26:59 18715 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB2013-04-17 01:26:59 18715 [Note] InnoDB: Database physically writes the file full: wait...2013-04-17 01:26:59 18715 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB2013-04-17 01:26:59 18715 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB2013-04-17 01:26:59 18715 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile02013-04-17 01:26:59 18715 [Warning] InnoDB: New log files created, LSN=457812013-04-17 01:26:59 18715 [Note] InnoDB: Doublewrite buffer not found: creating new2013-04-17 01:26:59 18715 [Note] InnoDB: Doublewrite buffer created2013-04-17 01:26:59 18715 [Note] InnoDB: 128 rollback segment(s) are active.2013-04-17 01:26:59 18715 [Warning] InnoDB: Creating foreign key constraint system tables.2013-04-17 01:26:59 18715 [Note] InnoDB: Foreign key constraint system tables created2013-04-17 01:26:59 18715 [Note] InnoDB: Creating tablespace and datafile system tables.2013-04-17 01:26:59 18715 [Note] InnoDB: Tablespace and datafile system tables created.2013-04-17 01:26:59 18715 [Note] InnoDB: Waiting for purge to start2013-04-17 01:26:59 18715 [Note] InnoDB: 1.2.10 started; log sequence number 02013-04-17 01:26:59 18715 [Note] Binlog end2013-04-17 01:26:59 18715 [Note] InnoDB: FTS optimize thread exiting.2013-04-17 01:26:59 18715 [Note] InnoDB: Starting shutdown...2013-04-17 01:27:00 18715 [Note] InnoDB: Shutdown completed; log sequence number 1625977OKFilling help tables...2013-04-17 01:27:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).2013-04-17 01:27:00 18738 [Note] InnoDB: The InnoDB memory heap is disabled2013-04-17 01:27:00 18738 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation2013-04-17 01:27:00 18738 [Note] InnoDB: Compressed tables use zlib 1.2.32013-04-17 01:27:00 18738 [Note] InnoDB: CPU does not support crc32 instructions2013-04-17 01:27:00 18738 [Note] InnoDB: Initializing buffer pool, size = 128.0M2013-04-17 01:27:00 18738 [Note] InnoDB: Completed initialization of buffer pool2013-04-17 01:27:00 18738 [Note] InnoDB: Highest supported file format is Barracuda.2013-04-17 01:27:00 18738 [Note] InnoDB: 128 rollback segment(s) are active.2013-04-17 01:27:00 18738 [Note] InnoDB: Waiting for purge to start2013-04-17 01:27:01 18738 [Note] InnoDB: 1.2.10 started; log sequence number 16259772013-04-17 01:27:01 18738 [Note] Binlog end2013-04-17 01:27:01 18738 [Note] InnoDB: FTS optimize thread exiting.2013-04-17 01:27:01 18738 [Note] InnoDB: Starting shutdown...2013-04-17 01:27:02 18738 [Note] InnoDB: Shutdown completed; log sequence number 1625987OKTo start mysqld at boot time you have to copysupport-files/mysql.server to the right place for your systemPLEASE 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 mysql5.6 password 'new-password'Alternatively you can run:/usr/local/mysql/bin/mysql_secure_installationwhich will also give you the option of removing the testdatabases and anonymous user created by default. This isstrongly 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.plcd mysql-test ; perl mysql-test-run.plPlease report any problems with the ./bin/mysqlbug script!The latest information about MySQL is available on the web athttp://www.mysql.comSupport MySQL by buying support/licenses at http://shop.mysql.comNew default config file was created as /usr/local/mysql/my.cnf andwill be used by default by the server when you start it.You may edit this file to change server settingsWARNING: Default config file /etc/my.cnf exists on the systemThis file will be read by default by the MySQL serverIf you do not want to use this, either remove it, or use the--defaults-file argument to mysqld_safe when starting the server[root@mysql5 scripts]#[root@mysql5 scripts]# cd /usr/local/mysql/support-files/[root@mysql5 support-files]# cp mysql.server /etc/rc.d/init.d/mysql[root@mysql5 support-files]# cp my-default.cnf /etc/my.cnfcp: overwrite `/etc/my.cnf'? y[root@mysql5 support-files]#[root@mysql5 support-files]# chkconfig -add mysql-add: unknown option[root@mysql5 support-files]# chkconfig --add mysql[root@mysql5 support-files]# chkconfig mysql on[root@mysql5 support-files]# service mysql startStarting MySQL. [ OK ][root@mysql5 support-files]#[root@mysql5 data]# mysql -u mysql -p -S /tmp/mysql.sockEnter password:Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 1Server version: 5.6.10 Source distributionType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql>mysql> status;--------------mysql Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (i686) using readline 5.1Connection id: 1Current database:Current user: mysql@localhostSSL: Not in useCurrent pager: stdoutUsing outfile: ''Using delimiter: ;Server version: 5.6.10 Source distributionProtocol version: 10Connection: Localhost via UNIX socketServer characterset: latin1Db characterset: latin1Client characterset: latin1Conn. characterset: latin1UNIX socket: /tmp/mysql.sockUptime: 3 min 38 secThreads: 1 Questions: 5 Slow queries: 0 Opens: 67 Flush tables: 1 Open tables: 60 Queries per second avg: 0.022--------------mysql>注:关于linux MySQL5.6版本的安装配置过程的内容就先介绍到这里,更多相关文章的可以留意
代码注释