国产99久久精品_欧美日本韩国一区二区_激情小说综合网_欧美一级二级视频_午夜av电影_日本久久精品视频

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當(dāng)前位置: 首頁 - 科技 - 知識百科 - 正文

RedHat5安裝Mysql5.1.7_MySQL

來源:懂視網(wǎng) 責(zé)編:小采 時間:2020-11-09 19:40:56
文檔

RedHat5安裝Mysql5.1.7_MySQL

RedHat5安裝Mysql5.1.7_MySQL: [root@hqw ~]# cd /home/app/mysql [root@hqw mysql]# ls --解壓 MySQL-community-5.1.73-1.rhel5.i386.rpm-bundle.tar [root@hqw mysql]# tar -xvf MySQL-community-5.1.73-1.rhel5.i386.rpm-b
推薦度:
導(dǎo)讀RedHat5安裝Mysql5.1.7_MySQL: [root@hqw ~]# cd /home/app/mysql [root@hqw mysql]# ls --解壓 MySQL-community-5.1.73-1.rhel5.i386.rpm-bundle.tar [root@hqw mysql]# tar -xvf MySQL-community-5.1.73-1.rhel5.i386.rpm-b
[root@hqw ~]# cd /home/app/mysql
[root@hqw mysql]# ls

--解壓
MySQL-community-5.1.73-1.rhel5.i386.rpm-bundle.tar
[root@hqw mysql]# tar -xvf MySQL-community-5.1.73-1.rhel5.i386.rpm-bundle.tar
MySQL-test-community-5.1.73-1.rhel5.i386.rpm
MySQL-embedded-community-5.1.73-1.rhel5.i386.rpm
MySQL-devel-community-5.1.73-1.rhel5.i386.rpm
MySQL-shared-compat-5.1.73-1.rhel5.i386.rpm
MySQL-shared-community-5.1.73-1.rhel5.i386.rpm
MySQL-server-community-5.1.73-1.rhel5.i386.rpm
MySQL-client-community-5.1.73-1.rhel5.i386.rpm
MySQL-community-debuginfo-5.1.73-1.rhel5.i386.rpm

--安裝
[root@hqw mysql]# rpm -ivh *.rpm
Preparing... ########################################### [100%]
1:MySQL-shared-community ########################################### [ 13%]
2:MySQL-devel-community ########################################### [ 25%]
3:MySQL-client-community ########################################### [ 38%]
4:MySQL-community-debugin########################################### [ 50%]
5:MySQL-embedded-communit########################################### [ 63%]
6:MySQL-server-community ########################################### [ 75%]

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h hqw.net password 'new-password'

Alternatively you can run:
/usr/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.

Please report any problems with the /usr/bin/mysqlbug script!

Starting MySQL..[ OK ]
Giving mysqld 2 seconds to start
7:MySQL-shared-compat ########################################### [ 88%]
8:MySQL-test-community ########################################### [100%]

--重置root密碼
[root@hqw mysql]# /usr/bin/mysqladmin -u root -h hqw.net password 'root'
[root@hqw mysql]# /usr/bin/mysqladmin -u root password 'root'

--啟動服務(wù)
[root@hqw mysql]# service mysql start
Starting MySQL [ OK ]

--root登錄
[root@hqw mysql]# mysql -uroot -proot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.73-community 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> select now();
+---------------------+
| now() |
+---------------------+
| 2014-11-22 08:01:09 |
+---------------------+
1 row in set (0.00 sec)

--新建遠(yuǎn)程賬戶

mysql> GRANT ALL PRIVILEGES ON *.* TO test@localhost IDENTIFIED BY 'test' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON *.* TO test@"%" IDENTIFIED BY 'test' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

--刷新權(quán)限
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit

--遠(yuǎn)程數(shù)據(jù)庫用戶登錄
[root@hqw mysql]# mysql -utest -ptest
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.73-community 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> select now();
+---------------------+
| now() |
+---------------------+
| 2014-11-22 08:02:36 |
+---------------------+
1 row in set (0.00 sec)

mysql>


mysql> exit
Bye
[root@hqw mysql]# exit
logout
Last login: Sat Nov 22 07:53:02 2014 from 192.168.11.1

--copy主配置文件
[root@hqw ~]# cp /usr/share/mysql/my-huge.cnf /etc/my.cnf

--往主配置文件添加 skip-name-resolve,skip-grant-tables為加快遠(yuǎn)程連接

--改動mysql的配置文件,在my.cnf中的[mysqld]下面(位置不能錯)加上lower_case_table_name=1這句(1表示不區(qū)分大小寫,0區(qū)分大小寫),保存重新啟動mysql

[root@hqw ~]# vi /etc/my.cnf
# Example MySQL config file for very large systems.
#
# This is for a large system with memory of 1G-2G where the system runs mainly
# MySQL.
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
lower_case_table_name=1
skip-name-resolve
skip-grant-tables
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
"/etc/my.cnf" 149L, 4748C written
[root@hqw ~]#

--設(shè)置防火墻允許3306端口

[root@hqw ~]# vi /etc/sysconfig/iptables
# Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 1158 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 5560 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1521 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
"/etc/sysconfig/iptables" 25L, 1275C
# Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 1158 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 5560 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1521 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
~
~
~
~
~
~
~
~
~
~
~
~
~
"/etc/sysconfig/iptables" 25L, 1275C written

--停止防火墻服務(wù)
[root@hqw ~]# service iptables stop
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]

--開啟防火墻服務(wù)
[root@hqw ~]# service iptables start
Applying iptables firewall rules: [ OK ]
Loading additional iptables modules: ip_conntrack_netbios_n[ OK ]
[root@hqw ~]#


--查看網(wǎng)絡(luò)配置

[root@hqw ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:0D:B0:9D
inet addr:192.168.11.6 Bcast:192.168.11.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe0d:b09d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:121089 errors:0 dropped:0 overruns:0 frame:0
TX packets:65139 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:169113515 (161.2 MiB) TX bytes:5457976 (5.2 MiB)
Interrupt:67 Base address:0x2000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:7086 errors:0 dropped:0 overruns:0 frame:0
TX packets:7086 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4800365 (4.5 MiB) TX bytes:4800365 (4.5 MiB)



--遠(yuǎn)程連接

\

聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

RedHat5安裝Mysql5.1.7_MySQL

RedHat5安裝Mysql5.1.7_MySQL: [root@hqw ~]# cd /home/app/mysql [root@hqw mysql]# ls --解壓 MySQL-community-5.1.73-1.rhel5.i386.rpm-bundle.tar [root@hqw mysql]# tar -xvf MySQL-community-5.1.73-1.rhel5.i386.rpm-b
推薦度:
標(biāo)簽: 安裝 安裝包 5.1
  • 熱門焦點(diǎn)

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 在线精品免费视频 | 久久成人国产精品二三区 | 国产精品一区二区国产 | 国产精品自拍第一页 | 欧美日韩国产在线播放 | 国产激情一区二区三区在线观看 | 国产高清在线免费视频 | 91精品国产91热久久p | 九九操视频 | 国产精品手机视频一区二区 | 国产一区二区免费 | 国产精品视频久久久久久 | 欧美va在线 | 国产a视频 | 国产aⅴ精品一区二区三区久久 | 在线精品国产一区二区 | 国产网站免费在线观看 | 日韩免费在线 | 日日操狠狠干 | 欧美高清亚洲欧美一区h | 日韩在线欧美高清一区 | 国产原创一区 | 热九九精品 | 国产一级二级三级 | 337p日本欧洲亚洲大胆精品 | 亚洲国产一区二区三区精品 | 国产精品久久久久久久y | 国产一区二区三区久久精品 | 日韩精品一区二区三区毛片 | 中文国产成人精品久久app | 日韩欧美在线综合 | 国产欧美综合一区二区 | 国产高清在线观看 | 欧美色综合图区 | 美女视频黄a视频全免费网站一区 | 91麻豆久久 | 成人区精品一区二区毛片不卡 | 性新婚a大黄毛片 | 欧美日韩a | 欧美精品一区二区三区在线播放 | 欧美日韩国产专区 |