Chapter 6 ■ Building low-Cost MysQl data nodes
What IF It DOeSN’t WOrK?
although highly unlikely, if it all goes completely wonky,^13 you can remove the MysQl installation
bundle with the following commands. they uninstall every package and remove any files created by the
installation.
sudo apt-get autoremove mysql-server mysql-server-5.5
sudo apt-get purge mysql-server mysql-server-5.5
once you’ve done this, you can try the install steps again and correct your mistake.
Now that MySQL is installed, let’s use the MySQL console and try to connect to the server. The
command is mysql –uroot –p
installed MySQL. Listing 6-2 shows a successful connection to the new MySQL server. I executed some
commands to test things and to gather information for the next step. Notice that the MySQL console displays
the version of the MySQL server as well as a short name for the platform. In this case, I was connected to a
MySQL 5.5.28-1 server on a Debian platform.
Listing 6-2. Connecting to MySQL
pi@raspberrypi ~ $ mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 43
Server version: 5.5.44-0+deb8u1 (Raspbian)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
(^13) A highly technical term for when computers don’t do what you think they should.