`
atgoingguoat
  • 浏览: 190631 次
  • 性别: Icon_minigender_1
  • 来自: 长沙
社区版块
存档分类
最新评论

mysql5 rpm linux 安装过程

阅读更多

mysql5 rpm linux 安装过程

 

MySQL-client-community-5.1.45-1.rhel5.i386.rpm

MySQL-server-community-5.1.44-1.rhel5.i386.rpm

 

说明如下:

1:用户root用户进入/usr/local

2: 上传:

  MySQL-client-community-5.1.45-1.rhel5.i386.rpm

   MySQL-server-community-5.1.44-1.rhel5.i386.rpm

 



 

 

3:  执行:

rpm -ivh MySQL-server-community-5.1.44-1.rhel5.i386.rpm

rpm -ivh MySQL-client-community-5.1.45-1.rhel5.i386.rpm

 

 报错:

 rpm -ivh MySQL-server-community-5.1.44-1.rhel5.i386.rpm
警告:MySQL-server-community-5.1.44-1.rhel5.i386.rpm: V3 DSA ?章:NOKEY, key ID 5072e1f5
??:相依性失?:
        libc.so.6(GLIBC_2.4) 是 MySQL-server-community-5.1.44-1.rhel5.i386 所需要的
        rtld(GNU_HASH) 是 MySQL-server-community-5.1.44-1.rhel5.i386 所需要的
        MySQL ? mysql-4.1.22-2.el4.i386 相?突
[root@czydmmsapp local]# rpm -ivh MySQL-client-community-5.1.44-1.rhel5.i386.rpm
??:?? MySQL-client-community-5.1.44-1.rhel5.i386.rpm 失?:没有那个文件或目录
[root@czydmmsapp local]# rpm -ivh MySQL-server-community-5.1.44-1.rhel5.i386.rpm
警告:MySQL-server-community-5.1.44-1.rhel5.i386.rpm: V3 DSA ?章:NOKEY, key ID 5072e1f5
??:相依性失?:
        libc.so.6(GLIBC_2.4) 是 MySQL-server-community-5.1.44-1.rhel5.i386 所需要的
        rtld(GNU_HASH) 是 MySQL-server-community-5.1.44-1.rhel5.i386 所需要的
        MySQL ? mysql-4.1.22-2.el4.i386 相?突

说是已经安装了另一版本。

用 rpm -e --nodeps mysql-4.1.22-2.el4.i386 删除它。

 

rpm -qa | grep mysql 或: rpm -qa | grep -i '^mysql-'

rm -rf /usr/include/mysql

rm -rf /usr/lib/mysql

rpm –e mod_auth_mysql

 

 

 4:然后进入mysql。 直接输入mysql就行了,因为刚开始mysql还没有设置密码。需要手动去修改



 

 5:进入mysql数据库:use mysql,Database changed

 

 查看一下root的情况:select user, password from user;

 

 

 

 

 

 6: 修改密码:

update user set password=PASSWORD("czyd(2010)") where user='root';

 

最好在执行一下:commit

 

7:ip访问

then: select host, user from user;

 

mysql> select host, user from user;
+-----------------------+------+
| host                  | user |
+-----------------------+------+
| %                     | test |
| 127.0.0.1             | root |
| localhost             |      |
| localhost             | root |
| localhost             | test |
| localhost.localdomain |      |
| localhost.localdomain | root |
+-----------------------+------+
7 rows in set (0.00 sec)

然后修改一个root用户的host为你的ip地址

 

update user u set u.host = 'your_ipaddress' where u.user = root and u.host = 'localhost';

 

update user u set u.host = '192.168.1.42' where u.user = root and u.host = 'localhost';

 

mysql> select host, user from user;
+-----------------------+------+
| host                  | user |
+-----------------------+------+
| %                     | test |
| 127.0.0.1             | root |
| 192.168.1.42          | root |
| localhost             | test |
| localhost.localdomain | root |
+-----------------------+------+
5 rows in set (0.00 sec)

 

 

8:重启: service mysqld restart

 

 

9:退出mysql:exit;

 

 

 

 

 

 

 

 

 

 

 

强制安装
 
rpm -ivh *.rpm --force --nodeps


/////////替换
rpm -ivh --replacefiles **.rpm

 

[root@czydmmsapp local]# rpm -ivh *.rpm --force --nodeps
警告:MySQL-client-community-5.1.45-1.rhel5.i386.rpm: V3 DSA ?章:NOKEY, key ID 5072e1f5
??中...                     ########################################### [100%]
   1:MySQL-server-community ########################################### [ 50%]
/usr/bin/my_print_defaults: error while loading shared libraries: requires glibc 2.5 or later dynamic linker
/usr/sbin/mysqld: error while loading shared libraries: requires glibc 2.5 or later dynamic linker

Installation of system tables failed!  Examine the logs in
/var/lib/mysql for more information.

You can try to start the mysqld daemon with:

    shell> /usr/sbin/mysqld --skip-grant &

and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> /usr/bin/mysql -u root mysql
    mysql> show tables

Try 'mysqld --help' if you have problems with paths.  Using --log
gives you a log in /var/lib/mysql that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com/.  Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.  Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us!  And remember, if
you do mail us, you MUST use the /usr/bin/mysqlbug script!

 

Notes regarding SELinux on this platform:
=========================================

The default policy might cause server startup to fail because it is
not allowed to access critical files. In this case, please update
your installation.

The default policy might also cause inavailability of SSL related
features because the server is not allowed to access /dev/random
and /dev/urandom. If this is a problem, please do the following:

  1) install selinux-policy-targeted-sources from your OS vendor
  2) add the following two lines to /etc/selinux/targeted/src/policy/domains/program/mysqld.te:
       allow mysqld_t random_device_t:chr_file read;
       allow mysqld_t urandom_device_t:chr_file read;
  3) cd to /etc/selinux/targeted/src/policy and issue the following command:
       make load


/usr/bin/my_print_defaults: error while loading shared libraries: requires glibc 2.5 or later dynamic linker
/usr/bin/my_print_defaults: error while loading shared libraries: requires glibc 2.5 or later dynamic linker
Starting MySQL.Manager of pid-file quit without updating file.[FAILED]
Giving mysqld 2 seconds to start
   2:MySQL-client-community ########################################### [100%]

日,没安装成功。

  • 大小: 19.4 KB
  • 大小: 22.2 KB
  • 大小: 12.8 KB
  • 大小: 37.5 KB
  • 大小: 23.6 KB
分享到:
评论
4 楼 shellfish 2010-07-23  
rpm 可以通过 yum localinstall ./***.rpm 来解决依赖问题,有时候可能需要加上--nogpgcheck选项..
客户端好像是navicat吧。
3 楼 wangliang_gz 2010-07-23  
你这是用什么客户端啊?
2 楼 niwtsew 2010-07-19  
如果是centos,可直接用yum install ..。它代为管理dependency
1 楼 atgoingguoat 2010-07-02  
卸载步骤如下:

卸载Mysql[root@yourdomainname/]# rpm -qa | grep mysql
mysql-3.23.58-9
php-mysql-4.3.4-11
mod_auth_mysql-20030510-4.1
mysql-server-3.23.58-9

说明:rpm –qa | grep mysql 命令是为了把mysql相关的包都列出来,我上面的例子是Fedora core2默认安装mysql的rpm软件包列表,如果是别的Linux版本列出来的列表有可能会不一样,不过不用担心,不管是什么,卸载都从最下面的一个包开始,直到卸载掉第一个为止。

比如:在这个例子中,我们应该先卸载mysql-server-3.23.58-9 方法如下:
rpm –e mysql-server

说明:rpm –e 是卸载rpm包的命令,后面是包名称,最后的版本号是不用打的,比如我们下一步卸载mod_auth_mysql-20030510-4.1包,方法如下:

rpm –e mod_auth_mysql

相关推荐

Global site tag (gtag.js) - Google Analytics