What is a Repository? A storage unit? Does my Ubuntu system have one? Does MySQLt come in one? Do I create one to put it in?

Posted December 11, 2016 1.9k views

I have installed MySQL but I cant get it to work. My book says type “service mysqld start” but it doesnt work, nor do 2 other options it gives. Other advice talks about a repository. I have no idea what this is or whether to use one or how to use one.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Repository is place (server) where programs (packages) are stored. When you use commands like apt-get install, it’ll download requested package from repository.

Storage unit depends of context you use it. Your server (Droplet) comes with SSD. Available space depends on Droplet size you select.

DigitalOcean has great tutorial base. How To Install MySQL on Ubuntu 16.04 will help you set up MySQL on Ubuntu 16.04.
How To Install MySQL on Ubuntu 14.04 will help you if you use Ubuntu 14.04.

by Hazel Virdó
MySQL is an open-source database management system, commonly installed as part of the popular LAMP (Linux, Apache, MySQL, PHP/Python/Perl) stack. It uses a relational database and SQL (Structured Query Language) to manage its data. This tutorial will explain how to install MySQL version 5.5, 5.6, or 5.7 on a Ubuntu 14.04 server. The easy way is `sudo apt-get update && sudo apt-get install mysql-server`.

Thank you, your answer was helpful, half-way. I now realise that I do not have to think about repositories at all in installing. Your recommended “How to install Mysql on ubuntu 14.04” was much clearer than other guides, until almost the end, when I got this:

The prompt is: (my name)@(myname-desktop):~S
I type: mysql
The output is: ** ERROR 1045 (28000): Access denied for user ‘mrwright’@'localhost’ (using password: NO)**

Why should it deny access for root? Why should it not use my password when I have just created a password for root and used it several times in the course of the setting-up? I hope you can tell me where to go from here!

  • Behavior you described is normal.
    When you execute mysql, it will assume that you use your current username on server for MySQL username and that you don’t have password.

    But if you execute:

    • mysql -u root -p

    You’ll be asked for you password first. Type it and press enter. Just to note, you will not see your password while typing, but don’t worry, it’s there.
    When you do this, you should see MySQL console.