Creating a Password with MySQL
Log into MySQL by typing:
mysql -u MYSQL-SUPER-USER -p
where MYSQL-SUPER-USER is the login for superuser on that database.
Enter a password when prompted and it will drop you into the standard
MySQL command line. Type the following commands to change the specific
user password:
use NESSUSDB;
set password for 'USERNAME@localhost' = password ('PASSWORD');
Replace the capitalized variables with your data. Note that if your
PHP scripts are running on a different host than your MySQL database,
you will need to replace localhost with "%" or your hostname
or IP address as MySQL ties login/password combinations to specific
hosts. The % acts as a wildcard allowing access to the MySQL database
from any host by the given login/password for that user. Then type
"flush privileges;" to reinitialize the database's
authentication tables and you should be good to go.
To see whether the database was properly created, log in again
using the above commands. Type "show databases;" at the
MySQL command prompt. You should get a list showing all the databases
and your newly created Nessus database should be one of them. Switch
to that specific database using "use NESSUSDB;" (using
your database's name) and then type "show tables;".
You should get the following results:
mysql> show tables;
+--------------------+
| Tables_in_nessusdb |
+--------------------+
| report |
| scans |
| scripts |
+--------------------+
3 rows in set (0.00 sec)
|