linux操作系统:centos 6.3
1、下载:当前mysql版本到了5.6.10
下载地址:http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.11.tar.gz
2、安装必要软件包
3、开始编译安装(默认情况下是安装在/usr/local/mysql )
[root@jbxue ~]# groupadd mysql
[root@jbxue ~]# useradd -r -g mysql mysql
[root@jbxue ~]# tar -zxvf mysql-5.6.10.tar.gz
[root@jbxue ~]# cd mysql-5.6.10
[root@jbxue mysql-5.6.10]# cmake .
[root@jbxue mysql-5.6.10]# make && make install
[root@jbxue ~]# chown -R mysql.mysql /usr/local/mysql
[root@jbxue ~]# cd /usr/local/mysql/scripts
[root@jbxue ~]# ./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
[root@jbxue ~]# cd /usr/local/mysql/support-files
[root@jbxue support-files]# cp mysql.server /etc/rc.d/init.d/mysql
[root@jbxue support-files]# cp my-default.cnf /etc/my.cnf
[root@jbxue ~]# chkconfig -add mysql
[root@jbxue ~]# chkconfig mysql on
[root@jbxue ~]# ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
[root@jbxue ~]# ln -s /usr/local/mysql/include/mysql /usr/include/mysql
[root@jbxue ~]# ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
[root@jbxue ~]# ln -s /usr/local/mysql/bin/mysqldump /usr/bin/mysqldump
[root@jbxue ~]# ln -s /usr/local/mysql/bin/myisamchk /usr/bin/myisamchk
[root@jbxue ~]# service mysql start
Starting MySQL SUCCESS!
[root@jbxue ~]# mysqladmin -u root password pwd
[root@jbxue ~]# mysql -uroot -ppwd
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.6.11 Source distribution
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.
4、开启远程连接权限
主机环境搭建之常用配置篇-Linux mysql 允许远程连接
通常,要在本地使用一些工具管理我们的数据库服务器,那么安装MySQL后,默认是不允许远程访问的,如何配置远程连接呢?
错误:
ERROR 1130: Host ’192.168.1.3′ is not allowed to connect to this MySQL server
解决方法:
注意:在mysql 命令行形式下一定要输入”;”.