首页 > 数据库技术 > 详细

centos 6.5 源码安装mysql

时间:2015-07-24 02:13:46      阅读:348      评论:0      收藏:0      [点我收藏+]
1.首先配置虚拟机连接网络
bubuko.com,布布扣

eth1配置如下

点击(此处)折叠或打开

  1. [root@MysqlPri ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
  2. DEVICE=eth1
  3. BOOTPROTO=static
  4. IPADDR=192.168.1.102
  5. NETMASK=255.255.255.0
  6. GATEWAY=192.168.1.253
  7. ONBOOT=yes
这时候会出现错误如下
bubuko.com,布布扣
解决如下
bubuko.com,布布扣
编辑DNS

点击(此处)折叠或打开

  1. [root@MysqlPri ~]# cat /etc/resolv.conf
  2. # Generated by NetworkManager


  3. # No nameservers found; try putting DNS servers into your
  4. # ifcfg files in /etc/sysconfig/network-scripts like so:
  5. #
  6. # DNS1=xxx.xxx.xxx.xxx
  7. # DNS2=xxx.xxx.xxx.xxx
  8. # DOMAIN=lab.foo.com bar.foo.com

  9. nameserver 192.168.1.253
至此能ping通百度

点击(此处)折叠或打开

  1. [root@MysqlPri media]# ping www.baidu.com
  2. PING www.a.shifen.com (119.75.218.70) 56(84) bytes of data.
  3. 64 bytes from 119.75.218.70: icmp_seq=1 ttl=53 time=58.5 ms
  4. 64 bytes from 119.75.218.70: icmp_seq=2 ttl=53 time=56.7 ms
先把linux自带的mysql卸载了rpm -qa | grep mysql

点击(此处)折叠或打开

  1. [root@MysqlPri ~]# rpm -e mysql-server-5.1.71-1.el6.x86_64 --nodeps
  2. [root@MysqlPri ~]# rpm -e qt-mysql-4.6.2-26.el6_4.x86_64 --nodeps
  3. [root@MysqlPri ~]# rpm -e mysql-5.1.71-1.el6.x86_64 --nodeps
软件包选择问题看  http://blog.itpub.net/29990276/viewspace-1744051/

点击(此处)折叠或打开

  1. [root@MysqlPri media]# yum -y install make gcc-c++ cmake bison-devel ncurses-devel bison
  2. Loaded plugins: fastestmirror, refresh-packagekit, security
  3. Loading mirror speeds from cached hostfile
  4.  * base: mirror.bit.edu.cn
  5.  * extras: mirrors.btte.net
  6.  * updates: mirror.bit.edu.cn
  7. base | 3.7 kB 00:00
  8. base/primary_db | 4.6 MB 00:03
  9. extras | 3.4 kB 00:00
  10. extras/primary_db | 31 kB 00:00
  11. updates | 3.4 kB 00:00
  12. updates/primary_db | 4.4 MB 00:03
  13. Setting up Install Process
  14. Package 1:make-3.81-20.el6.x86_64 already installed and latest version
  15. Resolving Dependencies
  16. --> Running transaction check
  17. ---> Package bison.x86_64 0:2.4.1-5.el6 will be installed
  18. ---> Package bison-devel.x86_64 0:2.4.1-5.el6 will be installed
  19. ---> Package cmake.x86_64 0:2.8.12.2-4.el6 will be installed
  20. ---> Package gcc-c++.x86_64 0:4.4.7-11.el6 will be installed
  21. --> Processing Dependency: libstdc++-devel = 4.4.7-11.el6 for package: gcc-c++-4.4.7-11.el6.x86_64
  22. --> Processing Dependency: libstdc++ = 4.4.7-11.el6 for package: gcc-c++-4.4.7-11.el6.x86_64
  23. --> Processing Dependency: gcc = 4.4.7-11.el6 for package: gcc-c++-4.4.7-11.el6.x86_64
  24. --> Processing Dependency: libmpfr.so.1()(64bit) for package: gcc-c++-4.4.7-11.el6.x86_64
  25. ---> Package ncurses-devel.x86_64 0:5.7-3.20090208.el6 will be installed
  26. --> Running transaction check
  27. ---> Package gcc.x86_64 0:4.4.7-11.el6 will be installed
  28. --> Processing Dependency: libgomp = 4.4.7-11.el6 for package: gcc-4.4.7-11.el6.x86_64
  29. --> Processing Dependency: cpp = 4.4.7-11.el6 for package: gcc-4.4.7-11.el6.x86_64
  30. --> Processing Dependency: libgcc >= 4.4.7-11.el6 for package: gcc-4.4.7-11.el6.x86_64
  31. --> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-11.el6.x86_64
  32. ---> Package libstdc++.x86_64 0:4.4.7-4.el6 will be updated
  33. ---> Package libstdc++.x86_64 0:4.4.7-11.el6 will be an update
  34. ---> Package libstdc++-devel.x86_64 0:4.4.7-11.el6 will be installed
  35. ---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed
  36. --> Running transaction check
  37. ---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed
  38. --> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
  39. --> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
  40. ---> Package cpp.x86_64 0:4.4.7-11.el6 will be installed
  41. ---> Package libgcc.i686 0:4.4.7-4.el6 will be updated
  42. ---> Package libgcc.x86_64 0:4.4.7-4.el6 will be updated
  43. ---> Package libgcc.i686 0:4.4.7-11.el6 will be an update
  44. ---> Package libgcc.x86_64 0:4.4.7-11.el6 will be an update
  45. ---> Package libgomp.x86_64 0:4.4.7-4.el6 will be updated
  46. ---> Package libgomp.x86_64 0:4.4.7-11.el6 will be an update
  47. --> Running transaction check
  48. ---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed
  49. --> Finished Dependency Resolution

  50. Dependencies Resolved

  51. ===============================================================================================================================================================================================
  52.  Package Arch Version Repository Size
  53. ===============================================================================================================================================================================================
  54. Installing:
  55.  bison x86_64 2.4.1-5.el6 base 637 k
  56.  bison-devel x86_64 2.4.1-5.el6 base 21 k
  57.  cmake x86_64 2.8.12.2-4.el6 base 8.0 M
  58.  gcc-c++ x86_64 4.4.7-11.el6 base 4.7 M
  59.  ncurses-devel x86_64 5.7-3.20090208.el6 base 642 k
  60. Installing for dependencies:
  61.  cloog-ppl x86_64 0.15.7-1.2.el6 base 93 k
  62.  cpp x86_64 4.4.7-11.el6 base 3.7 M
  63.  gcc x86_64 4.4.7-11.el6 base 10 M
  64.  libstdc++-devel x86_64 4.4.7-11.el6 base 1.6 M
  65.  mpfr x86_64 2.4.1-6.el6 base 157 k
  66.  ppl x86_64 0.10.2-11.el6 base 1.3 M
  67. Updating for dependencies:
  68.  libgcc i686 4.4.7-11.el6 base 113 k
  69.  libgcc x86_64 4.4.7-11.el6 base 102 k
  70.  libgomp x86_64 4.4.7-11.el6 base 133 k
  71.  libstdc++ x86_64 4.4.7-11.el6 base 294 k

  72. Transaction Summary
  73. ===============================================================================================================================================================================================
  74. Install 11 Package(s)
  75. Upgrade 4 Package(s)

  76. Total download size: 32 M
  77. Downloading Packages:
  78. (1/15): bison-2.4.1-5.el6.x86_64.rpm | 637 kB 00:01
  79. (2/15): bison-devel-2.4.1-5.el6.x86_64.rpm | 21 kB 00:00
  80. (3/15): cloog-ppl-0.15.7-1.2.el6.x86_64.rpm | 93 kB 00:00
  81. http://mirror.bit.edu.cn/centos/6.6/os/x86_64/Packages/cmake-2.8.12.2-4.el6.x86_64.rpm: [Errno 12] Timeout on http://mirror.bit.edu.cn/centos/6.6/os/x86_64/Packages/cmake-2.8.12.2-4.el6.x86_64.rpm: (28, ‘Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds‘)
  82. Trying other mirror.
  83. (4/15): cmake-2.8.12.2-4.el6.x86_64.rpm | 8.0 MB 00:01
  84. (5/15): cpp-4.4.7-11.el6.x86_64.rpm | 3.7 MB 00:02
  85. (6/15): gcc-4.4.7-11.el6.x86_64.rpm | 10 MB 00:07
  86. (7/15): gcc-c++-4.4.7-11.el6.x86_64.rpm | 4.7 MB 00:03
  87. (8/15): libgcc-4.4.7-11.el6.i686.rpm | 113 kB 00:00
  88. (9/15): libgcc-4.4.7-11.el6.x86_64.rpm | 102 kB 00:00
  89. (10/15): libgomp-4.4.7-11.el6.x86_64.rpm | 133 kB 00:00
  90. (11/15): libstdc++-4.4.7-11.el6.x86_64.rpm | 294 kB 00:00
  91. (12/15): libstdc++-devel-4.4.7-11.el6.x86_64.rpm | 1.6 MB 00:01
  92. (13/15): mpfr-2.4.1-6.el6.x86_64.rpm | 157 kB 00:00
  93. (14/15): ncurses-devel-5.7-3.20090208.el6.x86_64.rpm | 642 kB 00:00
  94. (15/15): ppl-0.10.2-11.el6.x86_64.rpm | 1.3 MB 00:00
  95. -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  96. Total 423 kB/s | 32 MB 01:16
  97. warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
  98. Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  99. Importing GPG key 0xC105B9DE:
  100.  Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
  101.  Package: centos-release-6-5.el6.centos.11.1.x86_64 (@anaconda-CentOS-201311272149.x86_64/6.5)
  102.  From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  103. Running rpm_check_debug
  104. Running Transaction Test
  105. Transaction Test Succeeded
  106. Running Transaction
  107.   Updating : libgcc-4.4.7-11.el6.x86_64 1/19
  108.   Updating : libstdc++-4.4.7-11.el6.x86_64 2/19
  109.   Installing : mpfr-2.4.1-6.el6.x86_64 3/19
  110.   Installing : cpp-4.4.7-11.el6.x86_64 4/19
  111.   Installing : ppl-0.10.2-11.el6.x86_64 5/19
  112.   Installing : cloog-ppl-0.15.7-1.2.el6.x86_64 6/19
  113.   Installing : libstdc++-devel-4.4.7-11.el6.x86_64 7/19
  114.   Updating : libgomp-4.4.7-11.el6.x86_64 8/19
  115.   Installing : gcc-4.4.7-11.el6.x86_64 9/19
  116.   Installing : gcc-c++-4.4.7-11.el6.x86_64 10/19
  117.   Installing : cmake-2.8.12.2-4.el6.x86_64 11/19
  118.   Installing : bison-devel-2.4.1-5.el6.x86_64 12/19
  119.   Installing : ncurses-devel-5.7-3.20090208.el6.x86_64 13/19
  120.   Installing : bison-2.4.1-5.el6.x86_64 14/19
  121.   Updating : libgcc-4.4.7-11.el6.i686 15/19
  122.   Cleanup : libstdc++-4.4.7-4.el6.x86_64 16/19
  123.   Cleanup : libgcc-4.4.7-4.el6 17/19
  124.   Cleanup : libgcc-4.4.7-4.el6 18/19
  125.   Cleanup : libgomp-4.4.7-4.el6.x86_64 19/19
  126.   Verifying : libstdc++-4.4.7-11.el6.x86_64 1/19
  127.   Verifying : gcc-4.4.7-11.el6.x86_64 2/19
  128.   Verifying : gcc-c++-4.4.7-11.el6.x86_64 3/19
  129.   Verifying : bison-2.4.1-5.el6.x86_64 4/19
  130.   Verifying : ppl-0.10.2-11.el6.x86_64 5/19
  131.   Verifying : mpfr-2.4.1-6.el6.x86_64 6/19
  132.   Verifying : cloog-ppl-0.15.7-1.2.el6.x86_64 7/19
  133.   Verifying : libgcc-4.4.7-11.el6.i686 8/19
  134.   Verifying : libgomp-4.4.7-11.el6.x86_64 9/19
  135.   Verifying : cmake-2.8.12.2-4.el6.x86_64 10/19
  136.   Verifying : libgcc-4.4.7-11.el6.x86_64 11/19
  137.   Verifying : libstdc++-devel-4.4.7-11.el6.x86_64 12/19
  138.   Verifying : cpp-4.4.7-11.el6.x86_64 13/19
  139.   Verifying : ncurses-devel-5.7-3.20090208.el6.x86_64 14/19
  140.   Verifying : bison-devel-2.4.1-5.el6.x86_64 15/19
  141.   Verifying : libgomp-4.4.7-4.el6.x86_64 16/19
  142.   Verifying : libgcc-4.4.7-4.el6.i686 17/19
  143.   Verifying : libgcc-4.4.7-4.el6.x86_64 18/19
  144.   Verifying : libstdc++-4.4.7-4.el6.x86_64 19/19

  145. Installed:
  146.   bison.x86_64 0:2.4.1-5.el6 bison-devel.x86_64 0:2.4.1-5.el6 cmake.x86_64 0:2.8.12.2-4.el6 gcc-c++.x86_64 0:4.4.7-11.el6 ncurses-devel.x86_64 0:5.7-3.20090208.el6

  147. Dependency Installed:
  148.   cloog-ppl.x86_64 0:0.15.7-1.2.el6 cpp.x86_64 0:4.4.7-11.el6 gcc.x86_64 0:4.4.7-11.el6 libstdc++-devel.x86_64 0:4.4.7-11.el6 mpfr.x86_64 0:2.4.1-6.el6 ppl.x86_64 0:0.10.2-11.el6

  149. Dependency Updated:
  150.   libgcc.i686 0:4.4.7-11.el6 libgcc.x86_64 0:4.4.7-11.el6 libgomp.x86_64 0:4.4.7-11.el6 libstdc++.x86_64 0:4.4.7-11.el6

  151. ....
2.安装使用Root用户,启动时指定用户启动(下面都是root操作,因为叫做”使用Root用户,启动时指定用户启动“)

点击(此处)折叠或打开

  1. -- 创建MySQL用户组
  2. groupadd mysql
  3. useradd -g mysql mysql

  4. --创建用户文件系统
  5. mkdir -p /mysql/mysql3306/data
  6. mkdir -p /mysql/mysql3306/logs
  7. mkdir -p /mysql/mysql3306/tmp
  8. chown -R mysql.mysql /mysql/mysql3306
解压source Code mysql-5.6.22.tar.gz包,并进入mysql-5.6.22进行cmake ,参数编译 。
可以看下安装包中的INSTALL-SOURCE和BUILD-CMAKE... ...
这里我们 

点击(此处)折叠或打开

  1. cmake \
  2. -DCMAKE_INSTALL_PREFIX=/mysql/mysql3306 \
  3. -DMYSQL_DATADIR=/mysql/mysql3306/data \
  4. -DSYSCONFDIR=/etc \
  5. -DWITH_MYISAM_STORAGE_ENGINE=1 \
  6. -DWITH_INNOBASE_STORAGE_ENGINE=1 \
  7. -DMYSQL_UNIX_ADDR=/mysql/mysql3306/mysql.sock \
  8. -DMYSQL_TCP_PORT=3306 \
  9. -DENABLED_LOCAL_INFILE=1 \
  10. -DWITH_PARTITION_STORAGE_ENGINE=1 \
  11. -DEXTRA_CHARSETS=all \
  12. -DDEFAULT_CHARSET=utf8 \
  13. -DDEFAULT_COLLATION=utf8_general_ci
--开始编译
--后面这个4是并行度,如果你只有1个Cpu,请不用设置 这一步时间相对比较长
make -j 4 
bubuko.com,布布扣
然后
make install 这个是真正安装,会在BASEDIR下生成文件的。


点击(此处)折叠或打开

  1. --编辑文件参数
  2. cat >> /etc/security/limits.conf <<EOF
  3. #MySQL setting
  4. mysql soft nproc 2047
  5. mysql hard nporc 16384
  6. mysql soft nofile 1024
  7. mysql hard nofile 65536
  8. EOF

  9. -- 添加BashShell变量
  10. cat >> ~/.bash_profile <<EOF
  11. PATH=\$PATH:\$HOME/bin:/mysql/mysql3306/bin
  12. export PATH
  13. EOF

配置my.cnf

点击(此处)折叠或打开

  1. cat >> /etc/my.cnf <<EOF
  2. sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
  3. explicit_defaults_for_timestamp
  4. port=3306
  5. user = mysql
  6. join_buffer_size = 32M
  7. sort_buffer_size = 32M
  8. read_rnd_buffer_size = 32M
  9. innodb_buffer_pool_size = 2047M
  10. #default-character-set=utf8
  11. #lower_case_table_names=1
  12. max_allowed_packet=128M

  13. [client]
  14. host ="localhost"
  15. password = "root123"
  16. user = "root"
  17. character-sets-dir=/mysql/mysql3306/share/
  18. EOF


点击(此处)折叠或打开

  1. [root@MysqlPri mysql-5.6.22]# /mysql/mysql3306/scripts/mysql_install_db --basedir=/mysql/mysql3306 --datadir=/mysql/mysql3306/data --user=mysql
  2. Installing MySQL system tables...2015-07-22 13:17:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
  3. 2015-07-22 13:17:00 25126 [Note] InnoDB: Using atomics to ref count buffer pool pages
  4. 2015-07-22 13:17:00 25126 [Note] InnoDB: The InnoDB memory heap is disabled
  5. 2015-07-22 13:17:00 25126 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  6. 2015-07-22 13:17:00 25126 [Note] InnoDB: Memory barrier is not used
  7. 2015-07-22 13:17:00 25126 [Note] InnoDB: Compressed tables use zlib 1.2.3
  8. 2015-07-22 13:17:00 25126 [Note] InnoDB: Not using CPU crc32 instructions
  9. 2015-07-22 13:17:00 25126 [Note] InnoDB: Initializing buffer pool, size = 128.0M
  10. 2015-07-22 13:17:00 25126 [Note] InnoDB: Completed initialization of buffer pool
  11. 2015-07-22 13:17:00 25126 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be
  12. 2015-07-22 13:17:00 25126 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
  13. 2015-07-22 13:17:00 25126 [Note] InnoDB: Database physically writes the file full: wait...
  14. 2015-07-22 13:17:01 25126 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
  15. 2015-07-22 13:17:01 25126 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
  16. 2015-07-22 13:17:01 25126 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
  17. 2015-07-22 13:17:01 25126 [Warning] InnoDB: New log files created, LSN=45781
  18. 2015-07-22 13:17:01 25126 [Note] InnoDB: Doublewrite buffer not found: creating new
  19. 2015-07-22 13:17:01 25126 [Note] InnoDB: Doublewrite buffer created
  20. 2015-07-22 13:17:01 25126 [Note] InnoDB: 128 rollback segment(s) are active.
  21. 2015-07-22 13:17:01 25126 [Warning] InnoDB: Creating foreign key constraint system tables.
  22. 2015-07-22 13:17:02 25126 [Note] InnoDB: Foreign key constraint system tables created
  23. 2015-07-22 13:17:02 25126 [Note] InnoDB: Creating tablespace and datafile system tables.
  24. 2015-07-22 13:17:02 25126 [Note] InnoDB: Tablespace and datafile system tables created.
  25. 2015-07-22 13:17:02 25126 [Note] InnoDB: Waiting for purge to start
  26. 2015-07-22 13:17:02 25126 [Note] InnoDB: 5.6.22 started; log sequence number 0
  27. 2015-07-22 13:17:02 25126 [Note] Binlog end
  28. 2015-07-22 13:17:02 25126 [Note] InnoDB: FTS optimize thread exiting.
  29. 2015-07-22 13:17:02 25126 [Note] InnoDB: Starting shutdown...
  30. 2015-07-22 13:17:03 25126 [Note] InnoDB: Shutdown completed; log sequence number 1625977
  31. OK

  32. Filling help tables...2015-07-22 13:17:03 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
  33. 2015-07-22 13:17:03 25148 [Note] InnoDB: Using atomics to ref count buffer pool pages
  34. 2015-07-22 13:17:03 25148 [Note] InnoDB: The InnoDB memory heap is disabled
  35. 2015-07-22 13:17:03 25148 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  36. 2015-07-22 13:17:03 25148 [Note] InnoDB: Memory barrier is not used
  37. 2015-07-22 13:17:03 25148 [Note] InnoDB: Compressed tables use zlib 1.2.3
  38. 2015-07-22 13:17:03 25148 [Note] InnoDB: Not using CPU crc32 instructions
  39. 2015-07-22 13:17:03 25148 [Note] InnoDB: Initializing buffer pool, size = 128.0M
  40. 2015-07-22 13:17:03 25148 [Note] InnoDB: Completed initialization of buffer pool
  41. 2015-07-22 13:17:03 25148 [Note] InnoDB: Highest supported file format is Barracuda.
  42. 2015-07-22 13:17:03 25148 [Note] InnoDB: 128 rollback segment(s) are active.
  43. 2015-07-22 13:17:03 25148 [Note] InnoDB: Waiting for purge to start
  44. 2015-07-22 13:17:03 25148 [Note] InnoDB: 5.6.22 started; log sequence number 1625977
  45. 2015-07-22 13:17:04 25148 [Note] Binlog end
  46. 2015-07-22 13:17:04 25148 [Note] InnoDB: FTS optimize thread exiting.
  47. 2015-07-22 13:17:04 25148 [Note] InnoDB: Starting shutdown...
  48. 2015-07-22 13:17:05 25148 [Note] InnoDB: Shutdown completed; log sequence number 1625987
  49. OK

  50. To start mysqld at boot time you have to copy
  51. support-files/mysql.server to the right place for your system

  52. PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
  53. To do so, start the server, then issue the following commands:

  54.   /mysql/mysql3306/bin/mysqladmin -u root password ‘new-password‘
  55.   /mysql/mysql3306/bin/mysqladmin -u root -h MysqlPri password ‘new-password‘

  56. Alternatively you can run:

  57.   /mysql/mysql3306/bin/mysql_secure_installation

  58. which will also give you the option of removing the test
  59. databases and anonymous user created by default. This is
  60. strongly recommended for production servers.

  61. See the manual for more instructions.

  62. You can start the MySQL daemon with:

  63.   cd . ; /mysql/mysql3306/bin/mysqld_safe &

  64. You can test the MySQL daemon with mysql-test-run.pl

  65.   cd mysql-test ; perl mysql-test-run.pl

  66. Please report any problems at http://bugs.mysql.com/

  67. The latest information about MySQL is available on the web at

  68.   http://www.mysql.com

  69. Support MySQL by buying support/licenses at http://shop.mysql.com

  70. New default config file was created as /mysql/mysql3306/my.cnf and
  71. will be used by default by the server when you start it.
  72. You may edit this file to change server settings

  73. WARNING: Default config file /etc/my.cnf exists on the system
  74. This file will be read by default by the MySQL server
  75. If you do not want to use this, either remove it, or use the
  76. --defaults-file argument to mysqld_safe when starting the server


点击(此处)折叠或打开

  1. [root@MysqlPri ~]# ps axu | grep mysql
  2. root 24913 0.0 0.0 163748 2008 pts/3 S 12:12 0:00 su - mysql
  3. mysql 24914 0.0 0.0 108340 1828 pts/3 S+ 12:12 0:00 -bash
  4. root 25440 0.0 0.0 103252 832 pts/0 S+ 13:24 0:00 grep mysql


点击(此处)折叠或打开

  1. --初始化后我们配置一个脚本启动MySQL数据库
  2. cat >> ~/.bash_profile <<EOF
  3. alias startup=‘mysqld_safe --user=mysql &‘
  4. EOF
startup 启动   

[回车]

mysql 进入  ... ...



centos 6.5 源码安装mysql

原文:http://blog.itpub.net/29990276/viewspace-1744767/

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!