2020年9月15日 星期二

Cent OS 7 Mysql 5.1.73 Install

 setenforce 0

yum info mariadb-libs.x86_64

yum remove mariadb-libs.x86_64


yum install wget gcc ncurses ncurses-devel


cd /tmp

wget http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.73.tar.gz

tar -zxvf mysql-5.1.73.tar.gz 

cd /tmp/mysql-5.1.73/


./configure  '--prefix=/usr/local/mysql' '--without-debug' '--with-charset=utf8' '--with-extra-charsets=all' '--enable-assembler' '--with-pthread' '--enable-thread-safe-client' '--with-mysqld-ldflags=-all-static' '--with-client-ldflags=-all-static' '--with-big-tables' '--with-readline' '--with-ssl' '--with-embedded-server' '--enable-local-infile' '--with-plugins=innobase'


vim configer 

搜尋 $RM "$cfgfile"

改為 $RM -f "$cfgfile"

"error"

/bin/rm: cannot remove 'libtoolT': No such file or directory

config.status: executing default commands



#需yum install gcc-c++


make[1]: *** [my_new.o] Error 127

make[1]: Leaving directory `/tmp/mysql-5.1.73/mysys'

make: *** [all-recursive] Error 1


#故安裝套件完成後

make

make install

#mysql安裝至/usr/local/mysql下



cp support-files/my-medium.cnf /etc/my.cnf

cp -r support-files/mysql.server /etc/init.d/mysqld

/sbin/chkconfig --del mysqld

/sbin/chkconfig --add mysqld

 

配置权限表

chown -R mysql:mysql /usr/local/mysqld

/usr/local/mysql/bin/mysql_install_db --user=mysql

 

 

启动mysql

给/etc/init.d/mysql 执行权限,然后运行

chmod a+wrx /etc/init.d/mysql

/etc/init.d/mysqld start

 

mysql初始化配置:


包括密码设置等

#/usr/local/mysql/bin/mysql_secure_installation


#

mysql root/P@ssw0rd

#


帳號建立與資料庫權限設定

/usr/local/mysql/bin/mysqladmin -u root -h c7m5 password 'P@ssw0rd'


帳號建立

GRANT ALL PRIVILEGES ON *.* TO 'edwin'@'%' IDENTIFIED BY '' WITH GRANT OPTION;

grant all privileges on *.* to 'edwin'@'%' IDENTIFIED BY 'ec5678';



帳號變數設定

export PATH=/usr/local/mysql/bin:$PATH


服務確認

ps -ef|grep mysql


netstat --tunlp


防火牆確認與開啟

sudo firewall-cmd --permanent --add-service=mysql

sudo firewall-cmd --permanent --zone=public --add-port=3306/tcp

firewall-cmd  --reload

firewall-cmd  --list-all




#phpmyadmin


vim /etc/httpd/conf.d/phpmyadmin.conf


<Directory "/usr/share/phpmyadmin">

Order Deny,Allow

Deny from all

Allow from 127.0.0.1

Allow from 192.168.10.0/24 

#新增可以連線資料庫的特定機器的ip位址或是網段



</Directory>



apachectl -k restart


#SMB


Excel 2007開啟出現stdole32.tlb視窗

開啟Excel 2007時會出現stdole32.tlb錯誤視窗,

KB2767916移除後就正常。


#2020/09/15突然跳出老問題

筆記一下省得忘了

Office 版本並行 設定

 Office 多版本並行時 避免設定錯誤,依據對應版本設定無須重新設定REG登錄檔

點選開始>執行

Win10 開始右鍵>執行


Office2000


reg add HKCU\Software\Microsoft\Office\9.0\Word\Options /v NoReReg /t REG_DWORD /d 1


Office2002


reg add HKCU\Software\Microsoft\Office\10.0\Word\Options /v NoReReg /t REG_DWORD /d 1


Office2003


reg add HKCU\Software\Microsoft\Office\11.0\Word\Options /v NoReReg /t REG_DWORD /d 1


Office2007


reg add HKCU\Software\Microsoft\Office\12.0\Word\Options /v NoReReg /t REG_DWORD /d 1


Office2010


reg add HKCU\Software\Microsoft\Office\14.0\Word\Options /v NoReReg /t REG_DWORD /d 1


Office2013


reg add HKCU\Software\Microsoft\Office\15.0\Word\Options /v NoReReg /t REG_DWORD /d 1



Office2016


reg add HKCU\Software\Microsoft\Office\16.0\Word\Options /v NoReReg /t REG_DWORD /d 1