免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2939 | 回复: 7
打印 上一主题 下一主题

linux下,如何把mysql从4.1升级到5.0? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-02-24 14:11 |只看该作者 |倒序浏览
如题:有点点急,希望能说个好的方法,好吗?
谢谢

论坛徽章:
0
2 [报告]
发表于 2006-02-24 15:38 |只看该作者
如果没有数据移植的话,比较简单
1.如果是rpm安装的,你用rpm -e卸载掉好了,然后安装新的
2.如果是二进制包的话,直接删除掉,安装新的mysql,然后把PATH等环境变量重新指一下


一般你也可以不用理原来的,比如安装mysql5的二进制包,原来的mysql4也不卸载,你解开后把my.cnf重新配一下,然后把mysql5的bin目录放到PATH变量的第一个位置,同样方法指定一下lib的路径就可以了

论坛徽章:
0
3 [报告]
发表于 2006-02-24 16:11 |只看该作者
可是我解包之后,没有看见有mysql.cnf这个文件啊
里面也就:
./bin/                         ./docs/                         ./EXCEPTIONS-CLIENT      ./scripts/   
./configure                 ./lib/                             ./INSTALL-BINARY             ./share/
./COPYING                 ./include/                      ./README                          ./sql-bench/
./data/                      ./mysql-test/                  ./man/                              ./support-files         ./tests/


就这么几个目录和文件啊

论坛徽章:
0
4 [报告]
发表于 2006-02-24 16:15 |只看该作者
你看一下/etc下有没有my.cnf,如果没有的话你就安装README操作来进行
建议看一下置顶的帖子先

论坛徽章:
0
5 [报告]
发表于 2006-02-24 16:49 |只看该作者
Install info:

/usr/local/mysql# scripts/mysql_install_db --user=mysql
Installing all prepared tables
Fill help tables

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h avsuper password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the ./bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the ./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 https://order.mysql.com
avsuper:/usr/local/mysql# chgrp -R mysql *
avsuper:/usr/local/mysql# bin/mysqld
mysqld         mysqld_safe    mysqldump
mysqld_multi   mysqld.sym.gz  mysqldumpslow
avsuper:/usr/local/mysql# bin/mysqld_safe --user=mysql &
[1] 22307
avsuper:/usr/local/mysql# Starting mysqld daemon with databases from /usr/local/ mysql/data

avsuper:/usr/local/mysql# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run /mysqld/mysqld.sock' (2)

论坛徽章:
0
6 [报告]
发表于 2006-02-24 17:30 |只看该作者
原帖由 jsz 于 2006-2-24 14:11 发表
如题:有点点急,希望能说个好的方法,好吗?
谢谢


New Features in 5.0
http://dev.mysql.com/doc/mysql/en/MySQL_5.0_Nutshell.html

How to Upgrade to 5.0
http://dev.mysql.com/doc/mysql/en/Upgrading-from-4.1.html

论坛徽章:
0
7 [报告]
发表于 2006-02-25 11:08 |只看该作者
有没有更简单点的方法?

论坛徽章:
0
8 [报告]
发表于 2006-02-25 20:21 |只看该作者
如果确保新版本对你的应用程序没有影响,可以先停掉数据库然后把数据文件拷贝过去就能直接用了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP