MySQL5.0.67是Fedora10安装时的可选项目。

测试的笔记本IP为192.168.0.100,作为安装Fedora10和MySQL5.0.67的服务器BlackMachine的IP地址为192.168.0.104.

以下是对MySQL的配置过程。

查看/etc/my.cnf文件

[root@blackmachine ~]# cd /etc/
[root@blackmachine etc]# vi my.cnf

my.cnf文件内容如下,可作为参照,不需要进行修改。
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# To allow mysqld to connect to a MySQL Cluster management daemon, uncomment
# these lines and adjust the connectstring as needed.
#ndbcluster
#ndb-connectstring="nodeid=4;host=localhost:1186"

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[ndbd]
# If you are running a MySQL Cluster storage daemon (ndbd) on this machine,
# adjust its connection to the management daemon here.
# Note: ndbd init script requires this to include nodeid!
connect-string="nodeid=2;host=localhost:1186"

[ndb_mgm]
# connection string for MySQL Cluster management tool
connect-string="host=localhost:1186"

设定Root的密码:

[root@blackmachine etc]# /usr/bin/mysqladmin -u root password '123456'

进入/usr/bin目录

[root@blackmachine etc]# cd /usr/bin

进入MySQL管理,进行授权
[root@blackmachine bin]#  ./mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.67 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> grant all privileges on *.* to root@'%' identified by "root";
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> grant select,update,insert,delete on *.* to root@192.168.0.100 identified by "root";
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye

重启下mysqld服务是否正常

[root@blackmachine bin]# service mysqld restart
Stopping MySQL:                                            [  OK  ]
Starting MySQL:                                            [  OK  ]

很好,然后再次进入数据库管理界面,又一次设定root的密码。

[root@blackmachine bin]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.67 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> update user set password=password('') where user='root';
Query OK, 5 rows affected (0.00 sec)
Rows matched: 5  Changed: 5  Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye

修改/etc/sysconfig/iptables文件,增加3306对外端口。

[root@blackmachine bin]# vi /etc/sysconfig/iptables

/etc/sysconfig/iptables的内容,其中粗体一行为新加的。
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

重启下防火墙

[root@blackmachine bin]# service iptables restart
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules:                         [  OK  ]

查看系统中已经启动的网络连接和对应的端口信息,3306应该在列

[root@blackmachine bin]# netstat -tlnpu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      6786/mysqld         
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      1473/rpcbind        
tcp        0      0 0.0.0.0:38098               0.0.0.0:*                   LISTEN      1486/rpc.statd      
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1886/sshd           
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      1974/cupsd          
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1903/sendmail: acce
tcp        0      0 :::111                      :::*                        LISTEN      1473/rpcbind        
tcp        0      0 :::22                       :::*                        LISTEN      1886/sshd           
udp        0      0 0.0.0.0:800                 0.0.0.0:*                               1473/rpcbind        
udp        0      0 0.0.0.0:34732               0.0.0.0:*                               1486/rpc.statd      
udp        0      0 0.0.0.0:814                 0.0.0.0:*                               1486/rpc.statd      
udp        0      0 0.0.0.0:68                  0.0.0.0:*                               1846/dhclient       
udp        0      0 0.0.0.0:36057               0.0.0.0:*                               1964/avahi-daemon:  
udp        0      0 0.0.0.0:5353                0.0.0.0:*                               1964/avahi-daemon:  
udp        0      0 0.0.0.0:111                 0.0.0.0:*                               1473/rpcbind        
udp        0      0 0.0.0.0:631                 0.0.0.0:*                               1974/cupsd          
udp        0      0 :::800                      :::*                                    1473/rpcbind        
udp        0      0 :::111                      :::*                                    1473/rpcbind        
[root@blackmachine bin]#

看到3306在列后,就可以通过192.168.0.100上的数据库客户端软件进行连接测试了

以上画面表征测试通过。

《全文完,纰漏不足之处烦请指出,谢谢!》

开放Fedora10自带的MySQL5.0.67的对外数据库服务的更多相关文章

  1. centos6.5环境通达OA数据库mysql5.0.67升级至mysql5.5.48方案

    centos6.5环境通达OA数据库mysql5.0.67升级至mysql5.5.42方案 整体方案: 环境准备,在备用服务器安装mysql5.5数据库 1.停用生产环境的应用访问 直接修改web的访 ...

  2. 重装上了Fedora8自带的MySQL5.0.45,再试,告捷!!

    MySql服务器IP是192.168.0.104,测试连接的笔记本IP为192.168.0.100. 以下命令说明两台机器的网络连接是通畅的: [root@bogon bin]# ping 192.1 ...

  3. 在Fedora10上安装MySQL5.0.18,告捷!

    又一次安MySQL了,为什么又呢,因为前面成功那次算配置,即配置Fedora10自带的MySQL,这个还不算自己安装的,所以有必要再安装一次,以后还装也有可能,换操作系统,换MySql版本都可能这样做 ...

  4. 开放平台鉴权以及OAuth2.0介绍

    OAuth 2.0 协议 OAuth是一个开发标准,允许用户授权第三方网站或应用访问他们存储在另外的服务提供者上的信息,而不需要将用户名和密码提供给第三方网站或分享他们数据的内容. OAuth 2.0 ...

  5. Linux下编译安装mysql-5.0.45.tar.gz

    安装环境:VMware9(桥接模式) + Linux bogon 2.6.32-642.3.1.el6.x86_64(查看linux版本信息:uname -a) 先给出MySQL For Linux ...

  6. 手动安装mysql-5.0.45.tar.gz

    Linux下编译安装 安装环境:VMware9(桥接模式) + Linux bogon 2.6.32-642.3.1.el6.x86_64(查看linux版本信息:uname -a) 先给出MySQL ...

  7. CentOS7.5 上使用 bundle 文件安装 MySQL8.0 MySQL5.0

    CentOS7.5 上使用 bundle 文件安装 MySQL8.0 MySQL5.0 CentOS7.5 环境 [root@instance-fjii60o3 ~]# rpm -qi centos- ...

  8. MySQL5.0安装图解

    打开下载的mysql安装文件mysql-5.0.27-win32.zip,双击解压缩,运行"setup.exe",出现如下界面: 按"Next"继续 选择安装类 ...

  9. ■Ascii逐字解码法注入,mysql5.0一下版本手工注入

    /*By:珍惜少年时*/ 逐字解码法,不一定非要猜字段内容.库名,表名,字段,data,都能猜. 环境过滤了select.union(mysql5.0以下的版本就不支持union所以也可以用此方法), ...

随机推荐

  1. PHP 5.5以上 使用 CURL 上传文件

    PHP 5.5以上 使用 CURL 上传文件的代码: curl_setopt(ch, CURLOPT_POSTFIELDS, [ 'file' => new CURLFile(realpath( ...

  2. [USACO11DEC]Grass Planting

    题目大意: 有一棵结点个数为n的树,有m个操作,可以将一段路径上每条边的权值+1或询问某一个边的权值. 思路: 树链剖分+线段树. 轻重链划分本身比较简单,主要需要思考如何用线段树维护每条链. 当x, ...

  3. HDU 1754 I Hate It 线段树RMQ

    I Hate It Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=175 ...

  4. UVALive 4423 String LD 暴力

    A - String LD Time Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %llu Submit Stat ...

  5. [Visual Studio] VS2012调试时很慢的解决方案

      1.转自http://guooge.com/archives/408.html VS2010调试极慢获取出现死机,因为启动了IntelliTrace Visual Studio 2010 Ulti ...

  6. 电子数据识别软件ABBYY FineReader

    ABBYY 是一家俄罗斯软件公司,在文档识别,数据捕获和语言技术的开发中居世界领先地位.其获奖产品 FineReader OCR 软件可以把静态纸文件和 PDF 文件转换成可管理的电子数据,可以大大节 ...

  7. 【Deep Learning】一、AutoEncoder

    Deep Learning 第一战: 完成:UFLDL教程 稀疏自编码器-Exercise:Sparse Autoencoder Code: 学习到的稀疏参数W1: 参考资料: UFLDL教程 稀疏自 ...

  8. My安装EclipseJS代码提示(Spket插件)

    最近须要大量使用JS来开发,可是MyEclipse2014自带的JS编辑器没有代码提示的功能,开发效率有点低,所以安装了一个Spket的插件,过程很easy,SVN插件的安装比这个更简单. Spket ...

  9. C#引用类型转换,到底使用is,as还是显式强转?

    在C#中,当引用类型需要转换的时候,经常会用到关键字is.as以及显式强转.本篇来体验这三者的用法. 先来梳理.NET引用类型转换的"约定俗成",或者叫"惯例" ...

  10. MVC文件上传05-使用客户端jQuery-File-Upload插件和服务端Backload组件自定义上传文件夹

    在零配置情况下,文件的上传文件夹是根目录下的Files文件夹,如何自定义文件的上传文件夹呢? MVC文件上传相关兄弟篇: MVC文件上传01-使用jquery异步上传并客户端验证类型和大小  MVC文 ...