

MySQL will handle things differently under the surface, but regardless of which storage engine is in use, you will interact with the database in the same way.Įach engine has its own advantages and disadvantages. Storage engines are transparent to the end user. There are two main engines that you’ll be interested in: InnoDB and MyISAM. These methods are referred to as either database or storage engines. MySQL is designed to allow data to be stored in different ways. Whilst the default configuration of MySQL provided by the Ubuntu packages is perfectly functional and performs well there are things you may wish to consider before you proceed. Replace 192.168.0.5 with the appropriate address, which can be determined via ip address show.Īfter making a configuration change, the MySQL daemon will need to be restarted: sudo systemctl restart rvice For example, to configure MySQL to listen for connections from network hosts, in the file /etc/mysql//mysqld.cnf, change the bind-address directive to the server’s IP address: bind-address = 192.168.0.5

You can edit the files in /etc/mysql/ to configure the basic settings – log file, port number, etc. If the server is not running correctly, you can type the following command to start it: sudo service mysql restartĪ good starting point for troubleshooting problems is the systemd journal, which can be accessed at the terminal prompt with this command: sudo journalctl -u mysql When you run this command, you should see something similar to the following: LISTEN 0 151 127.0.0.1:mysql 0.0.0.0:* users:(("mysqld",pid=149190,fd=29)) The network status of the MySQL service can also be checked by running the ss command at the terminal prompt: sudo ss -tap | grep mysql Oct 08 14:37:38 db. systemd: Started MySQL Community Server. Oct 08 14:37:36 db. systemd: Starting MySQL Community Server. └─2028 /usr/sbin/mysqld -daemonize -pid-file=/run/mysqld/mysqld.pid Loaded: loaded (/lib/systemd/system/rvice enabled vendor preset: enabled)Īctive: active (running) since Tue 14:37:38 PDT 2 weeks 5 days ago You can quickly check its current status via systemd: sudo service mysql status Once the installation is complete, the MySQL server should be started automatically.
#Mysql database server good with numbers install#
To install MySQL, run the following command from a terminal prompt: sudo apt install mysql-server It is intended for mission-critical, heavy-load production systems and mass-deployed software. MySQL is a fast, multi-threaded, multi-user, and robust SQL database server. Multi-node Configuration with Docker-Compose.We can even get a bit fancier and convert the normal size values from bytes into something more useful and understandable to most people like megabytes. INDEX_LENGTH is the length (or size) of the index file for the table (also in bytes).Īrmed with this information, we can execute a query that will list all tables in a specific database along with the disk space (size) of each.DATA_LENGTH is the length (or size) of all data in the table (in bytes).List Table Sizes From a Single DatabaseĪs can seen in the official documentation, the INFORMATION_SCHEMA.TABLES table contains around 20 columns, but for the purpose of determining the amount of disk space used by tables, we’ll focus on two columns in particular: DATA_LENGTH and INDEX_LENGTH. For our purposes we’re particularly interested in the tables metadata, which we can query to actually extract the size of various tables in the system. Everything from views and user_privilieges to columns and tables can be found in the INFORMATION_SCHEMA. Regardless of the name, what matters is the information provided by these INFORMATION_SCHEMA tables. While most other databases refer to this information as a catalog, the official MySQL documentation refers to the INFORMATION_SCHEMA metadata as tables.


Like most relational databases, MySQL provides useful metadata about the database itself.
