0

okay so I'm fairly new to the raspberry pi. I went and tried to install a MySQL server.

sudo apt-get install mysql-server python-mysqldb

the first time I tried it failed. So then I went and updated my raspberry pie and upgraded my raspberry pi.

sudo apt-get update

sudo apt-get upgrade

the second time it seems to all going pretty smooth. But I didn't uninstall it before reinstalling it the second time. So just wondering do you think it cleanly installed. Or should I just completely take it out and put it all back in to make sure?

1

Anything you do via apt should (precluding errors, of course, or misuse, such as killing an operation halfway through) leave things in a consistent state. That's one of the main purposes of a package manager.

the first time I tried it failed

While this doesn't seem to have critical bearing on your question since apparently everything now works, beware that just saying "it failed" is rarely enough information for anyone else to provide you with a useful amount of accurate information in return.

the second time it seems to all going pretty smooth

I'm presuming by that you meant the upgrade. While you can remove, then install, (or just --reinstall) something to the same version (if you are aware or suspect something has been screwed up), an upgrade means replacement with a newer version; an unqualified system wide upgrade will replace all installed software if there is a newer version available. Again, part of the purpose of the package manager is to automate this as necessary, so no, you don't have to uninstall anything first or worry about it afterward.

Doing an apt-get update; apt-get upgrade (as you did) once a week or so is a good idea.

0

If you have aptitude installed, you could use the command aptitude show <packagename>. The output looks somewhat like:

joachim@rygel:~$ sudo aptitude show mysql-server
Package: mysql-server                    
State: installed
Automatically installed: no
Version: 5.5.44-0+deb8u1
Priority: optional
Section: database
Maintainer: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Architecture: all
Uncompressed Size: 119 k
Depends: mysql-server-5.5
Description: MySQL database server (metapackage depending on the latest version)
 This is an empty package that depends on the current "best" version of mysql-server (currently mysql-server-5.5), as determined by the MySQL maintainers. Install this package if in doubt
 about which MySQL version you need. That will install the version recommended by the package maintainers.                                                                                      

 MySQL is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query language in the world. The main goals of   
 MySQL are speed, robustness and ease of use.                                                                                                                                                   
Homepage: http://dev.mysql.com/

The State line should give you insight on the status of your Mysql installation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.