上QQ阅读APP看书,第一时间看更新
MySQL
The second service that we will discuss is MySQL. It is a relational database system. MySQL is often used with the PHP programming language and an Apache web server to create a dynamic, web-based application. For the penetration testing process, you can use MySQL to store your penetration testing results, for example, the vulnerability information and network mapping result. Of course, you need to use the application to store those results.
To start the MySQL service in Kali Linux, you can perform the following steps:
- In a Terminal window, type the following:
service mysql start
- To test whether your MySQL has already started, you can use the MySQL client to connect to the server. We define the username (root) and the password to log in to the MySQL server:
mysql -u root
The system will respond with the following:
Enter password: Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 39 Server version: 5.5.44-1 (Debian) 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>
- After this MySQL prompt, you can provide any SQL commands. To exit from MySQL, just type quit.
By default, for security reasons, the MySQL service in Kali Linux can be accessed only from a local machine. You can change this configuration by editing the bind-address stanza in the MySQL configuration file located in /etc/mysql/my.cnf. We don't recommend that you change this behavior unless you want your MySQL to be accessed from elsewhere.
To stop the MySQL service, you can perform the following steps:
- In a Terminal window, type the following:
service mysql stop
- To start the MySQL service automatically after Kali Linux boots up, you can give the following command:
update-rc.d mysql defaults
This command will make the MySQL service start after the boot up.