Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Purpose of using mysql_secure_installation? [closed]

Tags:

mysql

I am trying to install MySQL on Ubuntu 12.04.

I want to use this command sudo mysql_secure_installation in Terminal, but I don't know the purpose of this command.

like image 563
Jaimin pandya Avatar asked Dec 24 '13 12:12

Jaimin pandya


People also ask

Why do we need to run the mysql_secure_installation command after installing MySQL?

mysql_secure_installation is a shell script developed for securing the MySQL server installation on Unix systems. The script configures security settings and allows you to: Set a password for root accounts (see how to reset or change MySQL root password) Remove the root accounts accessible from outside the localhost.

Should I remove test database and access to it MySQL?

By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment.

What is Mysql_install_db?

mysql_install_db initializes the MySQL data directory and creates the system tables that it contains, if they do not exist. It also initializes the system tablespace and related data structures needed to manage InnoDB tables.

What is the default root password for MySQL?

The default user for MySQL is root and by default it has no password. If you set a password for MySQL and you can't recall it, you can always reset it and choose another one.


1 Answers

It's designed to set a few initial parameters that are more secure than the default Ubuntu (and MySQL) installation.

According to http://dev.mysql.com/doc/refman/5.6/en/mysql-secure-installation.html:

This program enables you to improve the security of your MySQL installation in the following ways:

  • You can set a password for root accounts.
  • You can remove root accounts that are accessible from outside the local host.
  • You can remove anonymous-user accounts.
  • You can remove the test database (which by default can be accessed by all users, even anonymous users), and privileges that permit anyone to access databases with names that start with test_.
like image 59
Jeremy Smyth Avatar answered Oct 01 '22 06:10

Jeremy Smyth