Archive for 六月, 2016

1、服务器端启用脱机设置
右击共享文件夹->选择属性->在弹出的对应标签设置页面中点击“高级共享”按钮,打开目标文件夹的高级共享对话框,选中该对话框中的“共享此文件夹”复选项,同时单击“缓存”按钮,打开缓存设置对话框;
接着在该设置对话框中选择“用户从该共享打开的所有文件和程序将自动在脱机状态下可用”同时还要记得将“已进行性能优化”选项一并选中,最后单击“确定”按钮保存好上述设置操作,如此一来我们日后通过网络再次访问目标共享资源时,共享连接性能就不会受到网络连接状态的影响而始终稳定了。

2、巧妙设置协议,确保共享连接稳定
鼠标右键单击与目标共享资源相连的本地连接图标,之后在弹出的右键菜单中点选“属性”选项,打开对应本地连接的属性设置对话框;
其次在该设置对话框的“常规”标签设置页面中点选“Internet协议(TCP/IP)”选项,同时点中“属性”按钮,此时系统屏幕上会自动出现一个TCP/IP协议的设置对话框,单击“高级”按钮,弹出高级TCP/IP协议设置对话框;
接着单击该设置对话框中的“WINS”标签,打开WINS标签设置页面,在该页面的“NetBIOS设置”设置项处,选中“禁用TCP/IP上的 NetBIOS”项目,同时单击“确定”按钮保存好上述设置操作,这样一来本地Windows系统日后进行共享访问连接时,SMB网络协议就能始终使用 Direct hosting模式进行工作了,此时共享访问连接也就能始终稳定了。

3、关闭远程差分,提升共享连接速度
打开系统控制面板,在弹出的系统控制面板窗口中,再依次点选“程序”、“程序和功能”选项,在其后出现的程序和功能列表窗口中,单击左侧任务列表区域中的“打开或关闭Windows功能”选项;
其次从该列表窗口中找到“远程差分压缩”选项,检查该选项的选中状态,默认状态下Windows Vista或Windows7系统会自动选中“远程差分压缩”选项,此时我们应该及时取消该选项的选中状态,最后单击“确定”按钮执行参数设置保存操作,这么一来远程差分压缩功能就不会拖累共享连接速度了。

 1000Mbps以太网卡
802.3.az EEE Disabled
ARP Offload Disabled
Ethernet@WireSpeed Disabled
Flow Control Disabled
Jumbo Mtu 1500
Large Send Offload v2 (ipV4) Disabled
Large Send Offload v2 (ipV6) Disabled
Maximum Number of RSS Queue RSS 1 Queue
Priority & VLAN Priority Enabled
LinkSpeed/Duplex 100Mbps Full Duplex
TCP/UDP Checksum Offload Disabled
Wake on Magic packet Disabled
Wake on pattern Disabled Disabled
WakeOnLAN From PowerOff Disabled Disabled
WOL Speed 100Mb
 100Mbps以太网卡
802.1Q/1P VLAN Tagging Disabled
Flow Control Disabled
Jumbo Frame Disabled
Link Speed/Duplex Mode 100Mbps Full Duplex
Offload Checksum Disabled
Offload TCP LargeSemnd Disabled
Wake-On-Lan After Shutdown Enable

==============================卸载本机已安装的MySQL================================
[root@cloud opt]# rpm -qa | grep -i mysql
MySQL-client-5.5.16-1.rhel4.i386
MySQL-devel-5.5.16-1.rhel4.i386
MySQL-server-5.5.16-1.rhel4.i386

[root@cloud opt]# rpm -e –nodeps MySQL-client-5.5.16-1.rhel4.i386
[root@cloud opt]# rpm -e –nodeps MySQL-devel-5.5.16-1.rhel4.i386
[root@cloud opt]# rpm -e –nodeps MySQL-server-5.5.16-1.rhel4.i386

[root@cloud opt]# rpm -qa | grep -i mysql
[root@cloud opt]#

==========================下载32位MySQL安装包=====================================
wget -c http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-server-5.6.17-1.linux_glibc2.5.i386.rpm
wget -c http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-client-5.6.17-1.linux_glibc2.5.i386.rpm
wget -c http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-devel-5.6.17-1.linux_glibc2.5.i386.rpm

==========================下载64位MySQL安装包=====================================
wget -c http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-server-5.6.15-1.el6.x86_64.rpm
wget -c http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-devel-5.6.15-1.el6.x86_64.rpm
wget -c http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-client-5.6.15-1.el6.x86_64.rpm

==========================执行安装32位MySQL=======================================
rpm -ivh MySQL-server-5.6.17-1.linux_glibc2.5.i386.rpm
rpm -ivh MySQL-client-5.6.17-1.linux_glibc2.5.i386.rpm
rpm -ivh MySQL-devel-5.6.17-1.linux_glibc2.5.i386.rpm

==========================执行安装64位MySQL=======================================
rpm -ivh MySQL-server-5.6.15-1.el6.x86_64.rpm
rpm -ivh MySQL-devel-5.6.15-1.el6.x86_64.rpm
rpm -ivh MySQL-client-5.6.15-1.el6.x86_64.rpm

==========================复制my.cnf至/etc/my.cnf====================================
cp /usr/share/mysql/my-default.cnf /etc/my.cnf

==========================启动MySQL服务和配置=====================================
[root@cloud /]# service mysql start
Starting MySQL.. SUCCESS!

[root@cloud /]# mysql -uroot -p
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.6.17 MySQL Community Server (GPL)

Copyright (c) 2000, 2014, 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> SET PASSWORD = PASSWORD(‘123456’);
Query OK, 0 rows affected (0.02 sec)

mysql> GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’WITH GRANT OPTION;
Query OK, 0 rows affected (0.07 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)

mysql> exit
Bye

[root@cloud /]# mysql -uroot -p123456 -hxxx.xxx.xxx.xxx(主机IP地址)
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.6.17 MySQL Community Server (GPL)

Copyright (c) 2000, 2014, 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>

=============================MySQL异常问题=====================================
远程无法登陆
[root@cloud /]# service mysql stop
Shutting down MySQL.. SUCCESS!
[root@cloud /]# ps -ef | grep mysql
root 4981 2100 0 Jun07 pts/1 00:00:00 mysql -uroot -px xxxx
root 5282 2100 0 00:02 pts/1 00:00:00 grep mysql
[root@cloud /]# kill -9 4981
[root@cloud /]#
[1]+ 已杀死 mysql -uroot -p123456
[root@cloud /]# service mysql start
Starting MySQL. SUCCESS!

[root@cloud /]# mysql -uroot -p123456 -hxxx.xxx.xxx.xxx(主机IP地址)
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.17 MySQL Community Server (GPL)

Copyright (c) 2000, 2014, 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>
================================备注============================================
启动脚本:/etc/init.d/mysql
数据库目录:/var/lib/mysql/
数据库目录:/var/lib/mysql/
配置文件目录:/usr/share/mysql
MySQL Bin目录:/usr/bin