How to install mysql on CentOS
Huhu, I want to install mysql on CentOS 4.5.
Now I have some package : Quote:
Quote:
Quote:
|
Just use yum install mysql-server.
|
Hello!
You first tried to use rpn ( which is OK because you have the packages ) but then tried to install using yum - which wont work are none of your repo's are set up. To install mysql server type: Code:
rpm -ivh mysql-5.0.48-1.el4.centos.i386.rpm Code:
error: Failed dependencies: then type Code:
rpm -ivh --nodeps mysql-5.0.48-1.el4.centos.i386.rpm |
Well yum is better solution as it will eliminate all the dependency issues. Using --nodeps option is just a workaround which should not be used unless absolutely necessary. OP has got working internet connection and should use yum to install packages rather.
|
I would also use "yum install mysql-server". It solves the dependencies automatically, and this should work without downloading any rpm files. The option --nodeps should be used really carefully.
Regards Olli |
Part of the problem MAY be that Centos only supports the most current dot release, of the 4.X release I think that is 4.7. Jumping from 4.5 to 4.7 is just a matter of yum update. Problems can arise when the .repo files have been hard coded.
|
I don't know what dependencies it is needed. But i try
Quote:
Quote:
|
Hi ngohieutp,
why exactly did you do that?? That’s not a good way to install Software. The --nodeps switch should ONLY be used if you know what you are doing. I would recommend to uninstall the Software Quote:
Quote:
Greetings Olli |
While I would agree that using yum is the way to go, I do not think that Centos4.X is a bad choice. Centos4.x will be supported until Feb 2012. With RHEL/Centos 6 having been pushed back over a year(thus far) it is likely that the support life for 4.X and 5.X will be extended beyond the normal period(beyond 2012 for C4). If you do have to do a clean install and do not have a specific reason to stick with 4.X, then I would agree switching to 5.X would be a good idea.
I still suspect that the issues you are seeing with yum are that you have not update your machine to 4.7. Centos ONLY supports the most current dot release. Until you update the rest of the system to the 4.7 level you may not be able to install the mysql version you want. If you look here: http://mirror.centos.org/centos/4.5/ and here: http://mirror.centos.org/centos/4.6/ You will see that both of these are empty. If you have your repos hard coded to 4.5 they will not be able to work(there is nothing there for it to work with). |
Hi,
As lazlow said, i can understand that i cannot use yum to install mysql in CentOS 4.5, right? But my friend, he'd chosen some package when he installed CentOS 4.5. And he uses yum successfully. But I installed CentOS normally, i still cannot use yum. Ah, I installed CentOS using VMWare, and it can connect to internet. |
Ok, what I am saying is that you may have to bring the entire system up to the 4.7 (current) state BEFORE you will be able to install extra packages.
Edit: Please post the results of yum repolist . Centos4.X proper is only supporting mysql-sever4.X. The Centosplus repo has the series5 msyql. |
Thank you. I don't know what you want in
Quote:
1.CentOS-Base.repo Code:
[base] Code:
[main] |
Quote:
|
Hi, mine is different
[CODE] yum repolist usage: yum [options] < update | install | info | remove | list | clean | provides | search | check-update | groupinstall | groupupdate | grouplist | groupinfo | groupremove | makecache | localinstall | erase | upgrade | whatprovides | localupdate | resolvedep | shell | deplist > options: -h, --help show this help message and exit -t, --tolerant be tolerant of errors -C run entirely from cache, don't update cache -c [config file] config file location -R [minutes] maximum command wait time -d [debug level] debugging output level -e [error level] error output level -y answer yes for all questions --version show Yum version and exit --installroot=[path] set install root --enablerepo=[repo] enable one or more repositories (wildcards allowed) --disablerepo=[repo] disable one or more repositories (wildcards allowed) --exclude=[package] exclude package(s) by name or glob --obsoletes enable obsoletes processing during updates --noplugins disable Yum plugins [root@localhost ~]# [CODE] |
I am running C5 so it is just a difference between the two versions of yum (nothing to worry about). As you can see from my output it just tells you which repos are known(to yum) and which ones are active. However as you posted your repo file we can see that you have the centosplus repo shut off(which has the series5 mysql). However I think that is only half of the problem. In order for this to work we have to get the base yum repo up and running on your system.
Quote:
Quote:
|
I tried to edit my repos :
Code:
[base] Thank you very much. |
Go back and read my post again. You did not follow what I asked you to do(and as you have seen it does matter).
Edit: You may also have to run a "yum clean all" after any change to clear any cached information. |
Hi,
so the link is ok Quote:
1. What error are you getting?? 2. If you hardcode version 4.7 in "Base" and in "Update"and run "yum update", is the System not updating directly to 4.7?? Well I really, really would prefer to update to the most stable Release either of 4.x or 5.x (lazlow: you are right.. if there is no need to make an update from 4.x to 5.x, it shouldn`t be done, but that`s why I asked for the need of a 4.x version) Either hardcoding the repos is not a very good way.. it may help you this time, but next time you are searching for a yum problem not thinking about that you hardcoded some repos may drive you crazy. |
Quote:
Which is why I put it the way that I did. |
All times are GMT -5. The time now is 09:18 PM. |