PreliminariesThese notes are based on Ubuntu version 16.04, or equivalently, Linux Mint 18.
EditorsIn many situations you will need to edit your own files or system configuration files (as root). I would recommend one of these two:
nano non-graphical gedit graphicalFor your files:
$ nano <MY FILE> $ gedit <MY FILE>For system files:
$ sudo nano <MY FILE> $ sudo gedit <MY FILE>
$ sudo apt-get install mysql-client mysql-serverImmediately you're presented with the password entry. Key it in, tab to OK and Enter.
----------------| Configuring mysql-server-5.7 |-------------------- | While not mandatory, it is highly recommended that you set a | | password for the MySQL administrative "root" user. | | | | If this field is left blank, the password will not be changed. | | | | New password for the MySQL "root" user: | | | | foobar | | | | <OK> | -------------------------------------------------------------------This is followed by a confirmation dialog where you reenter the password. Begin by confirming that you can get access the MySQL server as root:
$ mysql -u root -p Enter password: foobarNow you can store and use this password so that you don't want to have to remember it. Create the file:
[client] user=root password='foobar'select
$ nano ~/.my.cnfYou can now get in as root without giving the password:
$ mysql mysql> quit
Change the root passwordPick a suitable NEW-PASSWORD, and change the root password to this as follows:
$ mysql mysql> alter user root@localhost identified by 'NEW-PASSWORD'; mysql> quitMake the change immediately in ~/.my.cnf before you forget it.
Create the test databaseThe notes refer to the standard database as the test database accessible by the guest user with empty password. Here is how we can create it:
$ mysql mysql> create database test; mysql> create user guest@localhost; mysql> grant all on test.* to guest@localhost; mysql> quitThen test entry into the new database by:
$ mysql -u guest test -p Enter password: ENTER mysql> quit
Install Apache/PhpThis is overkill, but you may need some of these packages later anyway:
$ sudo apt-get install \ apache2 php libapache2-mod-php php-cli php-mysql php-cgi \ php-curl php-json php-mcrypt php-apcu php-gd php-xml \ php-mbstring php-gettext phpmyadminInstallation of phpmyadmin requires these steps:
The first choice is to tell the configurator to pre-configure for
a choice of web servers: Apache, Lighttpd. We want Apache, so
tab to apache2 selection, hit space bar, getting:
Web server to reconfigure automatically: [*] apache2 [ ] lighttpdThen tab to OK and Enter.
Next choice is asking whether to configure the database used by phpmyadmin
for its management functions.
Configure database for phpmyadmin with dbconfig-common?We want it. Tab to Yes and hit Enter.
The next step is to provide the MySQL root password. Refer to
~/.my.cnf to confirm what you've set it to:
Password of the database's administrative user:Tab to OK and hit enter.
- Give a confirmation of the password.
user: root password: MYSQL-ROOT-PASSWORD