LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Completely Uninstall MySQL Server (https://www.linuxquestions.org/questions/linux-server-73/completely-uninstall-mysql-server-759920/)

k_oudom 10-05-2009 08:11 PM

Completely Uninstall MySQL Server
 
I try to uninstall MySQL server using rpm -e --nodeps mysql mysql-server and seen that it is not completely remove. When I install MySQL server again. The databases and root password still remain. May you tell me how to remove MySQL Server completely include databases and password? I'm using CentOS 5.3

One more thing, What is this command mean?

mysqladmin -h server1.example.com -u root password yourrootsqlpassword

jhcaiced 10-05-2009 08:55 PM

Hi,
In order to completely remove the mysql program and data, you also need to
delete the /var/lib/mysql directory and it's contents.

Be aware that deleting the rpm package using --nodeps can break other
packages depending on it.

For the options of your command, I suggest you read "man mysql" all
options are explained there.

Best regards,

hexahost 10-05-2009 09:00 PM

Quote:

Originally Posted by k_oudom (Post 3708916)
mysqladmin -h server1.example.com -u root password yourrootsqlpassword

mysqladmin is the program used to do administration of mysql Db from Linux shell. If you do not know this , what kind of task your are doing in a server ? Is your server is live and real ?

k_oudom 10-05-2009 09:37 PM

I'm working on a tutorial. I have seen this command line. Do you know what does it do?

kirukan 10-05-2009 11:34 PM

Simply you can assume what is that? (because there is a username and password, so it's a kind of security to protect your mysql). Don't expect the whole things from here to finish your assignment. Do the right search in google and prepare the assignment on yourself.

k_oudom 10-05-2009 11:39 PM

If you know you can tell me. That isn't easy to search the command line like this in google. It will be a lot of hits. If it is easy to learn linux, I wouldn't be here.

chrism01 10-06-2009 12:01 AM

Perhaps you'd like to read this: http://linux.die.net/man/1/mysqladmin

kirukan 10-06-2009 12:13 AM

I have searched in google there is about 7450 links in this regards, the exact command that you have posted
Quote:

I'm working on a tutorial. I have seen this command line. Do you know what does it do?
Even from any of link you can get the idea what does this command doing.

k_oudom 10-06-2009 03:00 AM

I ask here because I get error while configuring MySQL Server on CentOS 5.3

Code:

[root@server1 ~]# mysqladmin -u root password password123
[root@server1 ~]# mysqladmin -h server1.example.com -u root password password123
mysqladmin: connect to server at 'localhost' faild
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

When I try to telnet:
Code:

[root@server1 ~]# telnet server1.example.com
Trying 192.168.100.8...
telnet: connect to address 192.168.100.8: Connection refused
telnet: Unable to connect to remote host: Connection refused

Please don't try to lead me to read outside web pages. I already try to read a lot but It can't be help.

avijitp 10-06-2009 04:25 AM

Essence of GNU/Linux is to explore the power of openness if gives to you. It is always a pleasure to learn yourself and help others.

Code:

mysqladmin -h server1.example.com -u root password yourrootsqlpassword
As described earlier, "mysqladmin" is a tool to connect to the mysql server and manage it. With the above command, you will be connected to the mysql server running in the host "server1.example.com" with user root and mysql password "yourrootsqlpassword".

Hope this helps.

k_oudom 10-06-2009 05:04 AM

Really? But why I have to connect to MySQL since I execute the command in the Server Machine.

avijitp 10-06-2009 05:07 AM

I believe you were asking an explanation of the command that you posted. When in the same server you can either use mysqladmin or mysql as you want.


All times are GMT -5. The time now is 10:49 PM.