论坛首页 综合技术论坛

fedora7安装mysql

浏览 3788 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2007-12-21  
fedora7安装mysql

/*研究了半天,终于搞定,现将终端文本供大家参考*/
///////////////////////////////////////////////////////////////////
------------------------------------------------------------------
[mysql下载网址]

[MySQL-server-community-5.1.22-0.rhel5.i386.rpm]

[MySQL-client-community-5.1.22-0.rhel5.i386.rpm]

http://dev.mysql.com/downloads/mysql/5.0.html#downloads

[perl-DBI-1.53-2.fc7.i386.rpm]

http://rpmfind.net/linux/rpm2html/search.php?query=perl-DBI

[mysql-connector-java-5.1.5-bin.jar]

http://ftp.ntu.edu.tw/pub/MySQL/Downloads/Connector-J/mysql-connector-java-5.1.5.zip

------------------------------------------------------------------
[mysql安装过程]

[root@localhost usr]# cd MySQLTools
[root@localhost MySQLTools]# ls
mysql.chm
MySQL-client-community-5.1.22-0.rhel5.i386.rpm
mysql-connector-java-5.1.5.tar.gz
MySQL-server-community-5.1.22-0.rhel5.i386.rpm
perl-DBI-1.53-2.fc7.i386.rpm
[root@localhost MySQLTools]# rpm -qa|grep mysql
mysql-libs-5.0.37-2.fc7
php-mysql-5.2.2-3
[root@localhost MySQLTools]# rpm -e php-mysql-5.2.2-3
[root@localhost MySQLTools]# rpm -e mysql-libs-5.0.37-2.fc7
[root@localhost MySQLTools]# ls
mysql.chm
MySQL-client-community-5.1.22-0.rhel5.i386.rpm
mysql-connector-java-5.1.5.tar.gz
MySQL-server-community-5.1.22-0.rhel5.i386.rpm
perl-DBI-1.53-2.fc7.i386.rpm
[root@localhost MySQLTools]# rpm -ivh perl-DBI-1.53-2.fc7.i386.rpm
Preparing...                ########################################### [100%]
   1:perl-DBI               ########################################### [100%]
[root@localhost MySQLTools]# rpm -ivh MySQL-server-community-5.1.22-0.rhel5.i386.rpm
Preparing...                ########################################### [100%]
   1:MySQL-server-community ########################################### [100%]
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 localhost.localdomain password 'new-password'
See the manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
Starting MySQL.[确定]
Giving mysqld 2 seconds to start
[root@localhost MySQLTools]# netstat -nat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State     
tcp        0      0 127.0.0.1:2208              0.0.0.0:*                   LISTEN     
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN     
tcp        0      0 0.0.0.0:716                 0.0.0.0:*                   LISTEN     
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN     
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN     
tcp        0      0 127.0.0.1:2207              0.0.0.0:*                   LISTEN     
tcp        0      0 :::111                      :::*                        LISTEN     
tcp        0      0 :::22                       :::*                        LISTEN     
[root@localhost MySQLTools]# rpm -ivh MySQL-client-community-5.1.22-0.rhel5.i386.rpm
Preparing...                ########################################### [100%]
   1:MySQL-client-community ########################################### [100%]
[root@localhost MySQLTools]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.22-rc-community MySQL Community Edition (GPL)

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

mysql> use test
Database changed
mysql> create table test1116(id char(10),age integer,name char(20));
Query OK, 0 rows affected (0.00 sec)

mysql> insert into test1116 values ('001',20,'eddy');
Query OK, 1 row affected (0.00 sec)

mysql> select * from test1116;
+------+------+------+
| id   | age  | name |
+------+------+------+
| 001  |   20 | eddy |
+------+------+------+
1 row in set (0.00 sec)

mysql> exit
Bye
[root@localhost MySQLTools]# mysql

论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics