mysql5.6 rpm模式centos安装纪要

2016-07-12 10:27:27来源:oschina作者:longsys人点击

下载http://dev.mysql.com/downloads/mysql/5.6.html#downloadsMySQL-5.6.17-1.el6.x86_64.rpm-bundle.tar


确认依赖:rpm -qa | grep mysqlyum -y remove mysql-libs*yum -y remove mariadb-libs*


如果安装的最小化的centos需要安装依赖组件


yum install perlyum install net-toolsyum install -y perl-Module-Install.noarchyum install libaio


安装rpm -ivh MySQL-server-5.6.17-1.el6.x86_64.rpmrpm -ivh MySQL-devel-5.6.17-1.el6.x86_64.rpmrpm -ivh MySQL-client-5.6.17-1.el6.x86_64.rpm初始化/usr/bin/mysql_install_dbservice mysql start密码设置和修改cat /root/.mysql_secretmysql -uroot -pchown mysql:mysql */*/usr/bin/mysqladmin -u root password 'root'SET PASSWORD = PASSWORD('root'); service mysqld start/usr/bin/mysqladmin -u root password 'root'授权:GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root';FLUSH PRIVILEGES;

启动/etc/rc.d/init.d/mysqld start导入脚本:mysqldump -uroot -proot dbname>source.sqlmysqldump -uroot -proot -h10.100.1.11 dbname>source.sql开机启动chkconfig --list | grep mysqldchkconfig mysqld on把MySQL服务进程停掉: mysqladmin -uroot -p shutdown端口无法访问 防火墙service iptables statuschkconfig iptables --list/etc/sysconfig/iptables无法访问网络 DNS问题DNS:/etc/resolv.confcat /etc/resolv.confmysql配置find / -name my.cnfvi /etc/my.cnf存储引擎default-storage-engine=MyISAM大小写不敏感lower_case_table_names=1忘记密码mysqld_safe -skip-grant-tables &然后修改无法导入大的源文件SQL语句是有长度限制,在进行数据合并在同一SQL中务必不能超过SQL长度限制,通过max_allowed_packet配置可以修改,默认是1M,测试时修改为8M。max_allowed_packet=16Mmysql冷拷贝库j将原库直接拷贝到/var/lib/mysqlchown mysql:mysql *.*chmod 660 *.*

最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台