База знаний
The securemysql Script Распечатать статью
Overview:
The /usr/local/cpanel/scripts/securemysql
script secures a cPanel account’s MySQL® configuration. To do this, the script performs the following actions:
-
Confirms that MySQL’s
root
password exists. -
Changes the
var/db/mysql
andvar/lib/mysql
directories’ ownership to themysql
user. -
Removes the
anonymous
and remoteroot
users. -
Removes the test database.
-
Removes the database’s
LOCK TABLES
andTMP TABLES
privileges.
To undo any changes that this script performs, create the /etc/securemysqldisable
touch file.
Run the script
To use this script, run the following command as the root user:
/usr/local/cpanel/scripts/securemysql [arguments] [actions]
Arguments
The /usr/local/cpanel/scripts/securemysql
script accepts the following arguments:
-
-a
— Specify additional actions in a comma-separated list. For example:-a removeanon, removeremoteroot
Note:To perform all actions on a MySQL database, pass the
-a
argument without any additional actions. -
-F
— Execute the script and do not display the help text. -
-h
— Display the help message. -
-q
— Execute the script in silent mode.
Actions
You can specify any of the following options in a comma-separated list with the -a
argument:
-
removeanon
—Remove any anonymous MySQL users. -
removetestdb
— Remove test database. -
removelockntmp
— Remove globalLOCK TABLES
permissions and createTMP TABLES
privileges. -
removeremoteroot
— Remove remoteroot
user login privileges. -
removehordeallhosts
— Remove insecure Horde login credentials and privileges.Note:As of cPanel & WHM version 11.50, cPanel & WHM uses SQLite databases to store MySQL user data instead of Horde databases.
-
removehordeblankpass
— Remove Horde database users that possess blank login passwords.Note:As of cPanel & WHM version 11.50, cPanel & WHM uses SQLite databases to store MySQL user data instead of Horde databases.
Помог ли вам данный ответ?
Связанные статьи
Overview: The cPanel & WHM installation process adds important scripts to your server’s...
Overview: You can use the /usr/local/cpanel/bin/dbmaptool script to grant ownership of databases...
Overview: This script allows you to manage the task queue system. The task queue system allows...
Overview: The /usr/local/cpanel/scripts/auto-adjust-mysql-limits script updates MySQL®...
Overview: The /usr/local/cpanel/bin/autossl_check script allows you to manually check the SSL...