CentOS Install mysql-5.5.33-linux2.6-x86_64
[root@localhost ~]# hostname Mysql [root@localhost ~]# exit logout Connection closed. Type `help‘ to learn how to use Xshell prompt. Xshell:\> Connection closed by foreign host. Xshell:\> ssh 192.168.0.103 Connecting to 192.168.0.103:22... Connection established. To escape to local shell, press ‘Ctrl+Alt+]‘. Last login: Tue Mar 18 16:25:16 2014 1. 关闭iptables和selinux [root@localhost ~]# chkconfig iptables off [root@localhost ~]# chkconfig --list iptables iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@localhost ~]# service iptables stop [root@localhost ~]# vi /etc/sysconfig/selinux [root@localhost ~]# setenforce 0 setenforce: SELinux is disabled [root@localhost ~]# getenforce Disabled 2. 更改主机名 [root@localhost ~]# hostname Mysql 3. 校准主机时间 [root@localhost ~]# date Sat Mar 29 06:34:34 EDT 2014 [root@localhost ~]# date 0329103414 Sat Mar 29 10:34:00 EDT 2014 [root@localhost ~]# hwclowk -w -bash: hwclowk: command not found [root@localhost ~]# hwclock -w 4. 卸载系统自带的mysql安装的rpm包 [root@localhost ~]# rpm -qa |grep mysql mysql-libs-5.1.66-2.el6_3.x86_64 [root@localhost ~]# rpm -e --nodeps mysql-libs 5. 网络YUM [root@localhost ~]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm warning: /var/tmp/rpm-tmp.ncTgmp: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:epel-release ########################################### [100%] 6. 安装lvm vim [root@localhost ~]# rpm -qa |grep lvm [root@localhost ~]# yum -y install lvm2 vim Loaded plugins: fastestmirror base | 3.7 kB 00:00 base/primary_db | 4.4 MB 00:16 epel/metalink | 5.1 kB 00:00 epel | 4.4 kB 00:00 epel/primary_db | 6.0 MB 00:24 extras | 3.4 kB 00:00 extras/primary_db | 19 kB 00:00 updates | 3.4 kB 00:00 updates/primary_db | 2.5 MB 00:10 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package lvm2.x86_64 0:2.02.100-8.el6 will be installed --> Processing Dependency: lvm2-libs = 2.02.100-8.el6 for package: lvm2-2.02.100-8.el6.x86_64 --> Processing Dependency: device-mapper-persistent-data >= 0.2.8-2 for package: lvm2-2.02.100-8.el6.x86_64 --> Processing Dependency: libdevmapper.so.1.02(Base)(64bit) for package: lvm2-2.02.100-8.el6.x86_64 --> Processing Dependency: libdevmapper-event.so.1.02(Base)(64bit) for package: lvm2-2.02.100-8.el6.x86_64 --> Processing Dependency: libudev.so.0()(64bit) for package: lvm2-2.02.100-8.el6.x86_64 --> Processing Dependency: libdevmapper.so.1.02()(64bit) for package: lvm2-2.02.100-8.el6.x86_64 --> Processing Dependency: libdevmapper-event.so.1.02()(64bit) for package: lvm2-2.02.100-8.el6.x86_64 ---> Package vim-enhanced.x86_64 2:7.2.411-1.8.el6 will be installed --> Processing Dependency: vim-common = 2:7.2.411-1.8.el6 for package: 2:vim-enhanced-7.2.411-1.8.el6.x86_64 --> Processing Dependency: perl(:MODULE_COMPAT_5.10.1) for package: 2:vim-enhanced-7.2.411-1.8.el6.x86_64 --> Processing Dependency: libperl.so()(64bit) for package: 2:vim-enhanced-7.2.411-1.8.el6.x86_64 --> Processing Dependency: libgpm.so.2()(64bit) for package: 2:vim-enhanced-7.2.411-1.8.el6.x86_64 --> Running transaction check ---> Package device-mapper-event-libs.x86_64 0:1.02.79-8.el6 will be installed ---> Package device-mapper-libs.x86_64 0:1.02.79-8.el6 will be installed --> Processing Dependency: device-mapper = 1.02.79-8.el6 for package: device-mapper-libs-1.02.79-8.el6.x86_64 ---> Package device-mapper-persistent-data.x86_64 0:0.2.8-2.el6 will be installed ---> Package gpm-libs.x86_64 0:1.20.6-12.el6 will be installed ---> Package libudev.x86_64 0:147-2.51.el6 will be installed ---> Package lvm2-libs.x86_64 0:2.02.100-8.el6 will be installed --> Processing Dependency: device-mapper-event >= 1.02.79-8.el6 for package: lvm2-libs-2.02.100-8.el6.x86_64 ---> Package perl.x86_64 4:5.10.1-136.el6 will be installed --> Processing Dependency: perl(version) for package: 4:perl-5.10.1-136.el6.x86_64 --> Processing Dependency: perl(Pod::Simple) for package: 4:perl-5.10.1-136.el6.x86_64 --> Processing Dependency: perl(Module::Pluggable) for package: 4:perl-5.10.1-136.el6.x86_64 ---> Package perl-libs.x86_64 4:5.10.1-136.el6 will be installed ---> Package vim-common.x86_64 2:7.2.411-1.8.el6 will be installed --> Running transaction check ---> Package device-mapper.x86_64 0:1.02.79-8.el6 will be installed ---> Package device-mapper-event.x86_64 0:1.02.79-8.el6 will be installed ---> Package perl-Module-Pluggable.x86_64 1:3.90-136.el6 will be installed ---> Package perl-Pod-Simple.x86_64 1:3.13-136.el6 will be installed --> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.13-136.el6.x86_64 ---> Package perl-version.x86_64 3:0.77-136.el6 will be installed --> Running transaction check ---> Package perl-Pod-Escapes.x86_64 1:1.04-136.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ====================================================================================================================================== Package Arch Version Repository Size ====================================================================================================================================== Installing: lvm2 x86_64 2.02.100-8.el6 base 725 k vim-enhanced x86_64 2:7.2.411-1.8.el6 base 892 k Installing for dependencies: device-mapper x86_64 1.02.79-8.el6 base 164 k device-mapper-event x86_64 1.02.79-8.el6 base 115 k device-mapper-event-libs x86_64 1.02.79-8.el6 base 110 k device-mapper-libs x86_64 1.02.79-8.el6 base 195 k device-mapper-persistent-data x86_64 0.2.8-2.el6 base 2.3 M gpm-libs x86_64 1.20.6-12.el6 base 28 k libudev x86_64 147-2.51.el6 base 74 k lvm2-libs x86_64 2.02.100-8.el6 base 816 k perl x86_64 4:5.10.1-136.el6 base 10 M perl-Module-Pluggable x86_64 1:3.90-136.el6 base 40 k perl-Pod-Escapes x86_64 1:1.04-136.el6 base 32 k perl-Pod-Simple x86_64 1:3.13-136.el6 base 212 k perl-libs x86_64 4:5.10.1-136.el6 base 578 k perl-version x86_64 3:0.77-136.el6 base 51 k vim-common x86_64 2:7.2.411-1.8.el6 base 6.0 M Transaction Summary ====================================================================================================================================== Install 17 Package(s) Total download size: 22 M Installed size: 73 M Downloading Packages: (1/17): device-mapper-1.02.79-8.el6.x86_64.rpm | 164 kB 00:00 (2/17): device-mapper-event-1.02.79-8.el6.x86_64.rpm | 115 kB 00:00 (3/17): device-mapper-event-libs-1.02.79-8.el6.x86_64.rpm | 110 kB 00:00 (4/17): device-mapper-libs-1.02.79-8.el6.x86_64.rpm | 195 kB 00:01 (5/17): device-mapper-persistent-data-0.2.8-2.el6.x86_64.rpm | 2.3 MB 00:17 (6/17): gpm-libs-1.20.6-12.el6.x86_64.rpm | 28 kB 00:00 (7/17): libudev-147-2.51.el6.x86_64.rpm | 74 kB 00:00 (8/17): lvm2-2.02.100-8.el6.x86_64.rpm | 725 kB 00:02 (9/17): lvm2-libs-2.02.100-8.el6.x86_64.rpm | 816 kB 00:05 (10/17): perl-5.10.1-136.el6.x86_64.rpm | 10 MB 00:45 (11/17): perl-Module-Pluggable-3.90-136.el6.x86_64.rpm | 40 kB 00:00 (12/17): perl-Pod-Escapes-1.04-136.el6.x86_64.rpm | 32 kB 00:00 (13/17): perl-Pod-Simple-3.13-136.el6.x86_64.rpm | 212 kB 00:00 (14/17): perl-libs-5.10.1-136.el6.x86_64.rpm | 578 kB 00:02 (15/17): perl-version-0.77-136.el6.x86_64.rpm | 51 kB 00:00 (16/17): vim-common-7.2.411-1.8.el6.x86_64.rpm | 6.0 MB 00:36 (17/17): vim-enhanced-7.2.411-1.8.el6.x86_64.rpm | 892 kB 00:04 -------------------------------------------------------------------------------------------------------------------------------------- Total 193 kB/s | 22 MB 01:59 warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 Importing GPG key 0xC105B9DE: Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <[email protected]> Package: centos-release-6-4.el6.centos.10.x86_64 (@anaconda-CentOS-201303020151.x86_64/6.4) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Warning: RPMDB altered outside of yum. ** Found 3 pre-existing rpmdb problem(s), ‘yum check‘ output follows: 2:postfix-2.6.6-2.2.el6_1.x86_64 has missing requires of libmysqlclient.so.16()(64bit) 2:postfix-2.6.6-2.2.el6_1.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit) 2:postfix-2.6.6-2.2.el6_1.x86_64 has missing requires of mysql-libs Installing : libudev-147-2.51.el6.x86_64 1/17 Installing : device-mapper-libs-1.02.79-8.el6.x86_64 2/17 Installing : device-mapper-1.02.79-8.el6.x86_64 3/17 Installing : device-mapper-event-libs-1.02.79-8.el6.x86_64 4/17 Installing : device-mapper-event-1.02.79-8.el6.x86_64 5/17 Installing : lvm2-libs-2.02.100-8.el6.x86_64 6/17 Installing : 1:perl-Pod-Escapes-1.04-136.el6.x86_64 7/17 Installing : 1:perl-Pod-Simple-3.13-136.el6.x86_64 8/17 Installing : 3:perl-version-0.77-136.el6.x86_64 9/17 Installing : 4:perl-libs-5.10.1-136.el6.x86_64 10/17 Installing : 1:perl-Module-Pluggable-3.90-136.el6.x86_64 11/17 Installing : 4:perl-5.10.1-136.el6.x86_64 12/17 Installing : 2:vim-common-7.2.411-1.8.el6.x86_64 13/17 Installing : device-mapper-persistent-data-0.2.8-2.el6.x86_64 14/17 Installing : gpm-libs-1.20.6-12.el6.x86_64 15/17 Installing : 2:vim-enhanced-7.2.411-1.8.el6.x86_64 16/17 Installing : lvm2-2.02.100-8.el6.x86_64 17/17 Verifying : device-mapper-1.02.79-8.el6.x86_64 1/17 Verifying : 2:vim-enhanced-7.2.411-1.8.el6.x86_64 2/17 Verifying : gpm-libs-1.20.6-12.el6.x86_64 3/17 Verifying : device-mapper-persistent-data-0.2.8-2.el6.x86_64 4/17 Verifying : device-mapper-event-libs-1.02.79-8.el6.x86_64 5/17 Verifying : 1:perl-Module-Pluggable-3.90-136.el6.x86_64 6/17 Verifying : device-mapper-event-1.02.79-8.el6.x86_64 7/17 Verifying : 1:perl-Pod-Escapes-1.04-136.el6.x86_64 8/17 Verifying : lvm2-libs-2.02.100-8.el6.x86_64 9/17 Verifying : device-mapper-libs-1.02.79-8.el6.x86_64 10/17 Verifying : lvm2-2.02.100-8.el6.x86_64 11/17 Verifying : 1:perl-Pod-Simple-3.13-136.el6.x86_64 12/17 Verifying : 2:vim-common-7.2.411-1.8.el6.x86_64 13/17 Verifying : 3:perl-version-0.77-136.el6.x86_64 14/17 Verifying : 4:perl-libs-5.10.1-136.el6.x86_64 15/17 Verifying : 4:perl-5.10.1-136.el6.x86_64 16/17 Verifying : libudev-147-2.51.el6.x86_64 17/17 Installed: lvm2.x86_64 0:2.02.100-8.el6 vim-enhanced.x86_64 2:7.2.411-1.8.el6 Dependency Installed: device-mapper.x86_64 0:1.02.79-8.el6 device-mapper-event.x86_64 0:1.02.79-8.el6 device-mapper-event-libs.x86_64 0:1.02.79-8.el6 device-mapper-libs.x86_64 0:1.02.79-8.el6 device-mapper-persistent-data.x86_64 0:0.2.8-2.el6 gpm-libs.x86_64 0:1.20.6-12.el6 libudev.x86_64 0:147-2.51.el6 lvm2-libs.x86_64 0:2.02.100-8.el6 perl.x86_64 4:5.10.1-136.el6 perl-Module-Pluggable.x86_64 1:3.90-136.el6 perl-Pod-Escapes.x86_64 1:1.04-136.el6 perl-Pod-Simple.x86_64 1:3.13-136.el6 perl-libs.x86_64 4:5.10.1-136.el6 perl-version.x86_64 3:0.77-136.el6 vim-common.x86_64 2:7.2.411-1.8.el6 Complete! 7. 查看磁盘分区 [root@localhost ~]# fdisk -l Disk /dev/sda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00074fed Device Boot Start End Blocks Id System /dev/sda1 * 1 39 307200 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 39 169 1048576 82 Linux swap / Solaris Partition 2 does not end on cylinder boundary. /dev/sda3 169 5222 40586240 83 Linux Disk /dev/sdb: 2147 MB, 2147483648 bytes 255 heads, 63 sectors/track, 261 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 8. 基于第二块硬盘,创建逻辑分区 [root@localhost ~]# fdisk /dev/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0xbbb27746. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won‘t be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) WARNING: DOS-compatible mode is deprecated. It‘s strongly recommended to switch off the mode (command ‘c‘) and change display units to sectors (command ‘u‘). Command (m for help): m Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition 删除一个分区 l list known partition types 显示分区类型 m print this menu 显示命令菜单 n add a new partition 创建一个新的分区 o create a new empty DOS partition table p print the partition table 显示分区表 q quit without saving changes 不保存退出 s create a new empty Sun disklabel t change a partition‘s system id 更改一个分区的系统id号 u change display/entry units v verify the partition table w write table to disk and exit 写入保存并退出 x extra functionality (experts only) Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-261, default 1): 1 Last cylinder, +cylinders or +size{K,M,G} (1-261, default 261): 200 Command (m for help): p Disk /dev/sdb: 2147 MB, 2147483648 bytes 255 heads, 63 sectors/track, 261 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xbbb27746 Device Boot Start End Blocks Id System /dev/sdb1 1 200 1606468+ 83 Linux Command (m for help): t Selected partition 1 Hex code (type L to list codes): l 0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris 1 FAT12 39 Plan 9 82 Linux swap / So c1 DRDOS/sec (FAT- 2 XENIX root 3c PartitionMagic 83 Linux c4 DRDOS/sec (FAT- 3 XENIX usr 40 Venix 80286 84 OS/2 hidden C: c6 DRDOS/sec (FAT- 4 FAT16 <32M 41 PPC PReP Boot 85 Linux extended c7 Syrinx 5 Extended 42 SFS 86 NTFS volume set da Non-FS data 6 FAT16 4d QNX4.x 87 NTFS volume set db CP/M / CTOS / . 7 HPFS/NTFS 4e QNX4.x 2nd part 88 Linux plaintext de Dell Utility 8 AIX 4f QNX4.x 3rd part 8e Linux LVM df BootIt 9 AIX bootable 50 OnTrack DM 93 Amoeba e1 DOS access a OS/2 Boot Manag 51 OnTrack DM6 Aux 94 Amoeba BBT e3 DOS R/O b W95 FAT32 52 CP/M 9f BSD/OS e4 SpeedStor c W95 FAT32 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS fs e W95 FAT16 (LBA) 54 OnTrackDM6 a5 FreeBSD ee GPT f W95 Ext‘d (LBA) 55 EZ-Drive a6 OpenBSD ef EFI (FAT-12/16/ 10 OPUS 56 Golden Bow a7 NeXTSTEP f0 Linux/PA-RISC b 11 Hidden FAT12 5c Priam Edisk a8 Darwin UFS f1 SpeedStor 12 Compaq diagnost 61 SpeedStor a9 NetBSD f4 SpeedStor 14 Hidden FAT16 <3 63 GNU HURD or Sys ab Darwin boot f2 DOS secondary 16 Hidden FAT16 64 Novell Netware af HFS / HFS+ fb VMware VMFS 17 Hidden HPFS/NTF 65 Novell Netware b7 BSDI fs fc VMware VMKCORE 18 AST SmartSleep 70 DiskSecure Mult b8 BSDI swap fd Linux raid auto 1b Hidden W95 FAT3 75 PC/IX bb Boot Wizard hid fe LANstep 1c Hidden W95 FAT3 80 Old Minix be Solaris boot ff BBT 1e Hidden W95 FAT1 Hex code (type L to list codes): 8e Changed system type of partition 1 to 8e (Linux LVM) Command (m for help): p Disk /dev/sdb: 2147 MB, 2147483648 bytes 255 heads, 63 sectors/track, 261 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xbbb27746 Device Boot Start End Blocks Id System /dev/sdb1 1 200 1606468+ 8e Linux LVM Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@localhost ~]# fdisk -l Disk /dev/sda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00074fed Device Boot Start End Blocks Id System /dev/sda1 * 1 39 307200 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 39 169 1048576 82 Linux swap / Solaris Partition 2 does not end on cylinder boundary. /dev/sda3 169 5222 40586240 83 Linux Disk /dev/sdb: 2147 MB, 2147483648 bytes 255 heads, 63 sectors/track, 261 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xbbb27746 Device Boot Start End Blocks Id System /dev/sdb1 1 200 1606468+ 8e Linux LVM #id号为8e的lvm卷创建成功 [root@localhost ~]# partx -a /dev/sdb #告诉内核有关存在和磁盘上的分区的编号 BLKPG: Device or resource busy error adding partition 1 [root@localhost ~]# pvcreate /dev/sdb1 #创建物理卷 Physical volume "/dev/sdb1" successfully created [root@localhost ~]# vgcreate myvg /dev/sdb1 #创建卷组 卷组名为myvg Volume group "myvg" successfully created [root@localhost ~]# lvcreate -n mydata -L 1G myvg #创建一个1G的逻辑卷 逻辑卷名为mydata Logical volume "mydata" created [root@localhost ~]# lvs #显示逻辑卷列表 LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert mydata myvg -wi-a----- 1.00g [root@localhost ~]# mkfs mkfs mkfs.cramfs mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.ext4dev [root@localhost ~]# mkfs.ext4 /dev/myvg/mydata #格式化逻辑卷 格式为ext4 mke2fs 1.41.12 (17-May-2010) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 65536 inodes, 262144 blocks 13107 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=268435456 8 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376 Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 22 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. [root@localhost ~]# vim /etc/fstab #永久挂在 重启后依然生效 dev/myvg/mydata/mydataext4 defaults 0 0 #增加这一行 [root@localhost ~]# mkdir /mydata #创建挂载目录 [root@localhost ~]# mount /dev/myvg/mydata /mydata/ #挂载 [root@localhost ~]# mount -a #测试挂载是否成功 [root@localhost ~]# mount #显示挂在列表 /dev/sda3 on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw) /dev/sda1 on /boot type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) /dev/mapper/myvg-mydata on /mydata type ext4 (rw) [root@localhost ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 39G 864M 36G 3% / tmpfs 495M 0 495M 0% /dev/shm /dev/sda1 291M 30M 246M 11% /boot /dev/mapper/myvg-mydata 1008M 34M 924M 4% /mydata [root@localhost ~]# df -P #查看磁盘空间和挂载点 Filesystem 1024-blocks Used Available Capacity Mounted on /dev/sda3 39948688 883888 37035488 3% / tmpfs 506272 0 506272 0% /dev/shm /dev/sda1 297485 30451 251674 11% /boot /dev/mapper/myvg-mydata 1032088 34052 945608 4% /mydata [root@localhost ~]# 9. 新增mysql用户,用于运行mysql程序 [root@localhost ~]# useradd --help #useradd 帮助信息 Usage: useradd [options] LOGIN Options: -b, --base-dir BASE_DIR base directory for the home directory of the new account -c, --comment COMMENT GECOS field of the new account -d, --home-dir HOME_DIR home directory of the new account -D, --defaults print or change default useradd configuration -e, --expiredate EXPIRE_DATE expiration date of the new account -f, --inactive INACTIVE password inactivity period of the new account -g, --gid GROUP name or ID of the primary group of the new account -G, --groups GROUPS list of supplementary groups of the new account -h, --help display this help message and exit -k, --skel SKEL_DIR use this alternative skeleton directory -K, --key KEY=VALUE override /etc/login.defs defaults -l, --no-log-init do not add the user to the lastlog and faillog databases -m, --create-home create the user‘s home directory -M, --no-create-home do not create the user‘s home directory -N, --no-user-group do not create a group with the same name as the user -o, --non-unique allow to create users with duplicate (non-unique) UID -p, --password PASSWORD encrypted password of the new account -r, --system create a system account -s, --shell SHELL login shell of the new account -u, --uid UID user ID of the new account -U, --user-group create a group with the same name as the user -Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping [root@localhost ~]# groupadd -r mysql [root@localhost ~]# useradd -g mysql -r -s /sbin/nologin mysql [root@localhost ~]# id mysql uid=498(mysql) gid=499(mysql) groups=499(mysql) [root@localhost ~]# grep "mysql" /etc/passwd mysql:x:498:499::/home/mysql:/sbin/nologin 10. 创建data目录用于存放mysql数据,便于管理 [root@localhost ~]# mkdir /mydata/data [root@localhost ~]# ls /mydata data lost+found 11. 解压mysql的通用的二进制包到/usr/local目录 [root@localhost ~]# cd /usr/local/src/ [root@localhost src]# ls mysql-5.5.33-linux2.6-x86_64.tar.gz [root@localhost src]# tar xf mysql-5.5.33-linux2.6-x86_64.tar.gz -C /usr/local/ [root@localhost src]# cd /usr/local/ 12. 创建mysql的软连接 [root@localhost local]# ln -sv mysql-5.5.33-linux2.6-x86_64 mysql `mysql‘ -> `mysql-5.5.33-linux2.6-x86_64‘ [root@localhost local]# cd mysql [root@localhost mysql]# ls bin COPYING data docs include INSTALL-BINARY lib man mysql-test README scripts share sql-bench support-files [root@localhost mysql]# chown mysql:mysql . [root@localhost mysql]# ll total 200 drwxr-xr-x 2 root root 4096 Mar 29 10:54 bin -rw-r--r-- 1 7161 wheel 17987 Jul 15 2013 COPYING drwxr-xr-x 3 root root 4096 Mar 29 10:54 data drwxr-xr-x 2 root root 4096 Mar 29 10:54 docs drwxr-xr-x 3 root root 4096 Mar 29 10:54 include -rw-r--r-- 1 7161 wheel 134493 Jul 15 2013 INSTALL-BINARY drwxr-xr-x 3 root root 4096 Mar 29 10:54 lib drwxr-xr-x 4 root root 4096 Mar 29 10:55 man drwxr-xr-x 10 root root 4096 Mar 29 10:55 mysql-test -rw-r--r-- 1 7161 wheel 2496 Jul 15 2013 README drwxr-xr-x 2 root root 4096 Mar 29 10:55 scripts drwxr-xr-x 27 root root 4096 Mar 29 10:54 share drwxr-xr-x 4 root root 4096 Mar 29 10:55 sql-bench drwxr-xr-x 3 root root 4096 Mar 29 10:55 support-files 13.更改属主属组 [root@localhost mysql]# chown mysql:mysql /usr/local/mysql/* [root@localhost mysql]# ll total 200 drwxr-xr-x 2 mysql mysql 4096 Mar 29 10:54 bin -rw-r--r-- 1 mysql mysql 17987 Jul 15 2013 COPYING drwxr-xr-x 3 mysql mysql 4096 Mar 29 10:54 data drwxr-xr-x 2 mysql mysql 4096 Mar 29 10:54 docs drwxr-xr-x 3 mysql mysql 4096 Mar 29 10:54 include -rw-r--r-- 1 mysql mysql 134493 Jul 15 2013 INSTALL-BINARY drwxr-xr-x 3 mysql mysql 4096 Mar 29 10:54 lib drwxr-xr-x 4 mysql mysql 4096 Mar 29 10:55 man drwxr-xr-x 10 mysql mysql 4096 Mar 29 10:55 mysql-test -rw-r--r-- 1 mysql mysql 2496 Jul 15 2013 README drwxr-xr-x 2 mysql mysql 4096 Mar 29 10:55 scripts drwxr-xr-x 27 mysql mysql 4096 Mar 29 10:54 share drwxr-xr-x 4 mysql mysql 4096 Mar 29 10:55 sql-bench drwxr-xr-x 3 mysql mysql 4096 Mar 29 10:55 support-files [root@localhost mysql]# chown mysql:mysql /usr/local/mysql/* -R [root@localhost mysql]# chown mysql:mysql /mydata/data/ -R [root@localhost mysql]# ll -d /mydata/data/* ls: cannot access /mydata/data/*: No such file or directory [root@localhost mysql]# ll -d /mydata/data/ drwxr-xr-x 2 mysql mysql 4096 Mar 29 10:53 /mydata/data/ [root@localhost mysql]# 14. 初始化mysql [root@localhost mysql]# scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/mydata/data/ Installing MySQL system tables... # 初始化时报错说缺少libaio.so /usr/local/mysql/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory Installation of system tables failed! Examine the logs in /mydata/data/ for more information. You can try to start the mysqld daemon with: shell> /usr/local/mysql/bin/mysqld --skip-grant & and use the command line tool /usr/local/mysql/bin/mysql to connect to the mysql database and look at the grant tables: shell> /usr/local/mysql/bin/mysql -u root mysql mysql> show tables Try ‘mysqld --help‘ if you have problems with paths. Using --log gives you a log in /mydata/data/ that may be helpful. Please consult the MySQL manual section ‘Problems running mysql_install_db‘, and the manual section that describes problems on your OS. Another information source are the MySQL email archives available at http://lists.mysql.com/. Please check all of the above before mailing us! And remember, if you do mail us, you MUST use the /usr/local/mysql/scripts/mysqlbug script! [root@localhost mysql]# yum -y install libaio #安装libaio Loaded plugins: fastestmirror Determining fastest mirrors * base: mirrors.btte.net * epel: ftp6.sjtu.edu.cn * extras: mirrors.btte.net * updates: mirrors.btte.net Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package libaio.x86_64 0:0.3.107-10.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ====================================================================================================================================== Package Arch Version Repository Size ====================================================================================================================================== Installing: libaio x86_64 0.3.107-10.el6 base 21 k Transaction Summary ====================================================================================================================================== Install 1 Package(s) Total download size: 21 k Installed size: 34 k Downloading Packages: libaio-0.3.107-10.el6.x86_64.rpm | 21 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : libaio-0.3.107-10.el6.x86_64 1/1 Verifying : libaio-0.3.107-10.el6.x86_64 1/1 Installed: libaio.x86_64 0:0.3.107-10.el6 Complete! [root@localhost mysql]# scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/mydata/data/ Installing MySQL system tables... OK Filling help tables... 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 Mysql 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 ; /usr/local/mysql/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd /usr/local/mysql/mysql-test ; perl mysql-test-run.pl Please report any problems with the /usr/local/mysql/scripts/mysqlbug script! [root@localhost mysql]# chown root /usr/local/mysql/* -R #初始化完成后mysql中目录文件的属主应改回成root,以免被别人攻破mysql用户密码而带来数据破坏等 [root@localhost mysql]# cp support-files/my- my-huge.cnf my-innodb-heavy-4G.cnf my-large.cnf my-medium.cnf my-small.cnf [root@localhost mysql]# cp support-files/my-large.cnf /etc/my.cnf #为mysql提供主配置文件 [root@localhost mysql]# cp support-files/mysql mysqld_multi.server mysql-log-rotate mysql.server [root@localhost mysql]# cp support-files/mysql.server /etc/init.d/mysqld #为mysql提供sysv服务脚本并启动服务 [root@localhost mysql]# chmod +x /etc/init.d/mysqld [root@localhost mysql]# chkconfig --add mysqld [root@localhost mysql]# chkconfig mysqld on [root@localhost mysql]# chkconfig --list mysqld mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off 15 .启动mysql [root@localhost mysql]# service mysqld start Starting MySQL. ERROR! The server quit without updating PID file (/usr/local/mysql/data/Mysql.pid). [root@localhost mysql]# vim /etc/init.d/mysqld #新增一行 datadir = /mydata/data [root@localhost mysql]# service mysqld start # Starting MySQL... SUCCESS! [root@localhost mysql]# netstat -tnlp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1003/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1079/master tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2030/mysqld tcp 0 0 :::22 :::* LISTEN 1003/sshd tcp 0 0 ::1:25 :::* LISTEN 1079/master 16. 修改PATH环境变量,让系统可以直接使用mysql的相关命令 [root@localhost mysql]# vim /etc/profile.d/mysql.sh #修改PATH环境变量,让系统可以直接使用mysql的相关命令 #新增一行 export PATH=$PATH:/usr/local/mysql/bin [root@localhost mysql]# source /etc/profile #重新读取一下环境变量 17. 输出mysql的头文件至系统头文件路径/usr/include [root@localhost mysql]# ln -sv /usr/local/mysql/include/ /usr/include/mysql `/usr/include/mysql‘ -> `/usr/local/mysql/include/‘ [root@localhost mysql]# ll /usr/local/mysql/include/ total 488 -rw-r--r-- 1 root mysql 4574 Jul 15 2013 decimal.h -rw-r--r-- 1 root mysql 4087 Jul 15 2013 errmsg.h -rw-r--r-- 1 root mysql 7078 Jul 15 2013 keycache.h -rw-r--r-- 1 root mysql 27363 Jul 15 2013 m_ctype.h -rw-r--r-- 1 root mysql 9946 Jul 15 2013 m_string.h -rw-r--r-- 1 root mysql 1924 Jul 15 2013 my_alloc.h -rw-r--r-- 1 root mysql 2101 Jul 15 2013 my_attribute.h -rw-r--r-- 1 root mysql 4236 Jul 15 2013 my_compiler.h -rw-r--r-- 1 root mysql 15834 Jul 15 2013 my_config.h -rw-r--r-- 1 root mysql 7950 Jul 15 2013 my_dbug.h -rw-r--r-- 1 root mysql 3573 Jul 15 2013 my_dir.h -rw-r--r-- 1 root mysql 5540 Jul 15 2013 my_getopt.h -rw-r--r-- 1 root mysql 47652 Jul 15 2013 my_global.h -rw-r--r-- 1 root mysql 1506 Jul 15 2013 my_list.h -rw-r--r-- 1 root mysql 2007 Jul 15 2013 my_net.h -rw-r--r-- 1 root mysql 31706 Jul 15 2013 my_pthread.h drwxr-xr-x 3 root mysql 4096 Mar 29 10:54 mysql -rw-r--r-- 1 root mysql 22388 Jul 15 2013 mysql_com.h -rw-r--r-- 1 root mysql 73415 Jul 15 2013 mysqld_ername.h -rw-r--r-- 1 root mysql 27312 Jul 15 2013 mysqld_error.h -rw-r--r-- 1 root mysql 1185 Jul 15 2013 mysql_embed.h -rw-r--r-- 1 root mysql 28225 Jul 15 2013 mysql.h -rw-r--r-- 1 root mysql 2143 Jul 15 2013 mysql_time.h -rw-r--r-- 1 root mysql 854 Jul 15 2013 mysql_version.h -rw-r--r-- 1 root mysql 39193 Jul 15 2013 my_sys.h -rw-r--r-- 1 root mysql 2741 Jul 15 2013 my_xml.h -rw-r--r-- 1 root mysql 3996 Jul 15 2013 plugin_audit.h -rw-r--r-- 1 root mysql 7599 Jul 15 2013 plugin_ftparser.h -rw-r--r-- 1 root mysql 23322 Jul 15 2013 plugin.h -rw-r--r-- 1 root mysql 4561 Jul 15 2013 sql_common.h -rw-r--r-- 1 root mysql 12854 Jul 15 2013 sql_state.h -rw-r--r-- 1 root mysql 1184 Jul 15 2013 sslopt-case.h -rw-r--r-- 1 root mysql 2222 Jul 15 2013 sslopt-longopts.h -rw-r--r-- 1 root mysql 1285 Jul 15 2013 sslopt-vars.h -rw-r--r-- 1 root mysql 2283 Jul 15 2013 typelib.h 18. 输出mysql的库文件给系统库查找路径 [root@localhost mysql]# vim /etc/ld.so.conf ld.so.conf ld.so.conf.d/ [root@localhost mysql]# vim /etc/ld.so.conf.d/mysql.conf /usr/local/mysql/lib: libtcmalloc_minimal.so.0 -> libtcmalloc_minimal.so (changed) libmysqlclient.so.18 -> libmysqlclient_r.so.18.0.0 /lib: /lib64: libsemanage.so.1 -> libsemanage.so.1 libgobject-2.0.so.0 -> libgobject-2.0.so.0.2200.5 libsepol.so.1 -> libsepol.so.1 librt.so.1 -> librt-2.12.so libdevmapper.so.1.02 -> libdevmapper.so.1.02 libaio.so.1 -> libaio.so.1.0.1 libnss_nisplus.so.2 -> libnss_nisplus-2.12.so libss.so.2 -> libss.so.2.0 libdl.so.2 -> libdl-2.12.so libudev.so.0 -> libudev.so.0.5.1 libcom_err.so.2 -> libcom_err.so.2.1 libgcrypt.so.11 -> libgcrypt.so.11.5.3 libgpg-error.so.0 -> libgpg-error.so.0.5.0 libnss_dns.so.2 -> libnss_dns-2.12.so libply.so.2 -> libply.so.2.0.0 liblvm2cmd.so.2.02 -> liblvm2cmd.so.2.02 libpopt.so.0 -> libpopt.so.0.0.0 libfreebl3.so -> libfreebl3.so libnih-dbus.so.1 -> libnih-dbus.so.1.0.0 libnspr4.so -> libnspr4.so liblvm2app.so.2.2 -> liblvm2app.so.2.2 libBrokenLocale.so.1 -> libBrokenLocale-2.12.so libauparse.so.0 -> libauparse.so.0.0.0 libgio-2.0.so.0 -> libgio-2.0.so.0.2200.5 libdevmapper-event-lvm2.so.2.02 -> libdevmapper-event-lvm2.so.2.02 libuuid.so.1 -> libuuid.so.1.3.0 libcrypt.so.1 -> libcrypt-2.12.so libutil.so.1 -> libutil-2.12.so libwrap.so.0 -> libwrap.so.0.7.6 libdb-4.7.so -> libdb-4.7.so libldap-2.4.so.2 -> libldap-2.4.so.2.5.6 libplds4.so -> libplds4.so libc.so.6 -> libc-2.12.so libpthread.so.0 -> libpthread-2.12.so libgcc_s.so.1 -> libgcc_s-4.4.7-20120601.so.1 libexpat.so.1 -> libexpat.so.1.5.2 libkrb5support.so.0 -> libkrb5support.so.0.1 libply-splash-core.so.2 -> libply-splash-core.so.2.0.0 libgmodule-2.0.so.0 -> libgmodule-2.0.so.0.2200.5 libnss_nis.so.2 -> libnss_nis-2.12.so libm.so.6 -> libm-2.12.so libaio.so.1.0.0 -> libaio.so.1.0.0 libiptc.so.0 -> libiptc.so.0.0.0-1.4.7 libselinux.so.1 -> libselinux.so.1 libnsl.so.1 -> libnsl-2.12.so libgssapi_krb5.so.2 -> libgssapi_krb5.so.2.2 liblber-2.4.so.2 -> liblber-2.4.so.2.5.6 libncursesw.so.5 -> libncursesw.so.5.7 libSegFault.so -> libSegFault.so libk5crypto.so.3 -> libk5crypto.so.3.1 libpam.so.0 -> libpam.so.0.82.2 libattr.so.1 -> libattr.so.1.1.0 libpam_misc.so.0 -> libpam_misc.so.0.82.0 libkrb5.so.3 -> libkrb5.so.3.3 libplc4.so -> libplc4.so libanl.so.1 -> libanl-2.12.so libe2p.so.2 -> libe2p.so.2.3 libpci.so.3 -> libpci.so.3.1.10 libnss_files.so.2 -> libnss_files-2.12.so libglib-2.0.so.0 -> libglib-2.0.so.0.2200.5 libz.so.1 -> libz.so.1.2.3 libnih.so.1 -> libnih.so.1.0.0 libcidn.so.1 -> libcidn-2.12.so libgssrpc.so.4 -> libgssrpc.so.4.1 libreadline.so.6 -> libreadline.so.6.0 libbz2.so.1 -> libbz2.so.1.0.4 libfipscheck.so.1 -> libfipscheck.so.1.1.0 ld-linux-x86-64.so.2 -> ld-2.12.so libcap-ng.so.0 -> libcap-ng.so.0.0.0 libnss_hesiod.so.2 -> libnss_hesiod-2.12.so libncurses.so.5 -> libncurses.so.5.7 libthread_db.so.1 -> libthread_db-1.0.so libipq.so.0 -> libipq.so.0.0.0-1.4.7 libip4tc.so.0 -> libip4tc.so.0.0.0-1.4.7 libresolv.so.2 -> libresolv-2.12.so libdevmapper-event.so.1.02 -> libdevmapper-event.so.1.02 libaudit.so.1 -> libaudit.so.1.0.0 libkeyutils.so.1 -> libkeyutils.so.1.3 libip6tc.so.0 -> libip6tc.so.0.0.0-1.4.7 libpcre.so.0 -> libpcre.so.0.0.1 libproc-3.2.8.so -> libproc.so libext2fs.so.2 -> libext2fs.so.2.4 libgthread-2.0.so.0 -> libgthread-2.0.so.0.2200.5 libdbus-1.so.3 -> libdbus-1.so.3.4.0 libcap.so.2 -> libcap.so.2.16 libmount.so.1 -> libmount.so.1.1.0 libxtables.so.4 -> libxtables.so.4.0.0-1.4.7 libidn.so.11 -> libidn.so.11.6.1 libnss_compat.so.2 -> libnss_compat-2.12.so libpamc.so.0 -> libpamc.so.0.82.1 libacl.so.1 -> libacl.so.1.1.0 libldap_r-2.4.so.2 -> libldap_r-2.4.so.2.5.6 libtinfo.so.5 -> libtinfo.so.5.7 libblkid.so.1 -> libblkid.so.1.1.0 libldif-2.4.so.2 -> libldif-2.4.so.2.5.6 /usr/lib: /usr/lib64: libmemusage.so -> libmemusage.so libopcodes-2.20.51.0.2-5.36.el6.so -> libopcodes-2.20.51.0.2-5.36.el6.so libmp.so.3 -> libmp.so.3.1.14 libdrm_nouveau.so.1 -> libdrm_nouveau.so.1.0.0 libbfd-2.20.51.0.2-5.36.el6.so -> libbfd-2.20.51.0.2-5.36.el6.so libpcprofile.so -> libpcprofile.so libnssdbm3.so -> libnssdbm3.so libdrm_intel.so.1 -> libdrm_intel.so.1.0.0 libnssckbi.so -> libnssckbi.so libsoftokn3.so -> libsoftokn3.so librpmbuild.so.1 -> librpmbuild.so.1.0.0 libdrm_radeon.so.1 -> libdrm_radeon.so.1.0.1 libcrack.so.2 -> libcrack.so.2.8.1 libform.so.5 -> libform.so.5.7 liblua-5.1.so -> liblua-5.1.so libgmp.so.3 -> libgmp.so.3.5.0 librpmio.so.1 -> librpmio.so.1.0.0 libgdbm.so.2 -> libgdbm.so.2.0.0 libpython2.6.so.1.0 -> libpython2.6.so.1.0 libtic.so.5 -> libtic.so.5.7 libssh2.so.1 -> libssh2.so.1.0.1 libcurl.so.4 -> libcurl.so.4.1.1 libuser.so.1 -> libuser.so.1.2.2 libcrypto.so.10 -> libcrypto.so.1.0.0 libkdb5.so.6 -> libkdb5.so.6.0 libnss3.so -> libnss3.so libgpgme-pth.so.11 -> libgpgme-pth.so.11.6.6 libverto-k5ev.so.0 -> libverto-k5ev.so.0.0 libnssutil3.so -> libnssutil3.so libsqlite3.so.0 -> libsqlite3.so.0.8.6 libffi.so.5 -> libffi.so.5.0.6 libssl3.so -> libssl3.so libkadm5clnt_mit.so.8 -> libkadm5clnt_mit.so.8.0 libsmime3.so -> libsmime3.so libnsssysinit.so -> libnsssysinit.so libgmpxx.so.4 -> libgmpxx.so.4.1.0 libpciaccess.so.0 -> libpciaccess.so.0.11.1 libelf.so.1 -> libelf-0.152.so libpanel.so.5 -> libpanel.so.5.7 libusb-0.1.so.4 -> libusb-0.1.so.4.4.4 libnewt.so.0.52 -> libnewt.so.0.52.11 libdrm_nouveau2.so.2 -> libdrm_nouveau2.so.2.0.0 libkadm5srv_mit.so.8 -> libkadm5srv_mit.so.8.0 libusbpp-0.1.so.4 -> libusbpp-0.1.so.4.4.4 libnsspem.so -> libnsspem.so libpanelw.so.5 -> libpanelw.so.5.7 libustr-1.0.so.1 -> libustr-1.0.so.1.0.4 libhistory.so.6 -> libhistory.so.6.0 libxml2.so.2 -> libxml2.so.2.7.6 libmenuw.so.5 -> libmenuw.so.5.7 libgpgme.so.11 -> libgpgme.so.11.6.6 libfam.so.0 -> libfam.so.0.0.0 libgpm.so.2 -> libgpm.so.2.1.0 libverto.so.0 -> libverto.so.0.0 librpm.so.1 -> librpm.so.1.0.0 libformw.so.5 -> libformw.so.5.7 libdrm.so.2 -> libdrm.so.2.4.0 libgamin-1.so.0 -> libgamin-1.so.0.1.10 libsasl2.so.2 -> libsasl2.so.2.0.23 libslang.so.2 -> libslang.so.2.2.1 libpcrecpp.so.0 -> libpcrecpp.so.0.0.0 liblzma.so.0 -> liblzma.so.0.0.0 libssl.so.10 -> libssl.so.1.0.0 libutempter.so.0 -> libutempter.so.1.1.5 libdbus-glib-1.so.2 -> libdbus-glib-1.so.2.1.0 libmagic.so.1 -> libmagic.so.1.0.0 libply-boot-client.so.2 -> libply-boot-client.so.2.0.0 libgpgme-pthread.so.11 -> libgpgme-pthread.so.11.6.6 libstdc++.so.6 -> libstdc++.so.6.0.13 libpcreposix.so.0 -> libpcreposix.so.0.0.0 libpth.so.20 -> libpth.so.20.0.27 libmenu.so.5 -> libmenu.so.5.7 /lib64/tls: (hwcap: 0x8000000000000000) /usr/lib64/tls: (hwcap: 0x8000000000000000) /usr/lib64/sse2: (hwcap: 0x0000000004000000) 19.登陆测试mysql [root@localhost mysql]# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.33-log MySQL Community Server (GPL) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | test | +--------------------+ 4 rows in set (0.01 sec) mysql>
本文出自 “郑彦生” 博客,请务必保留此出处http://467754239.blog.51cto.com/4878013/1386422
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。