Setting Up a MySQL User

image_pdfimage_print

Setting Up a MySQL User

Our application requires to access the MySQL database. For security reasons, we do not want this user to be the root MySQL user, so we define a user named www-data that has read access to the local databases and can only connect locally with some password.

  • First we need to connect to the MySQL monitor using the default password we specified earlier:

  • Then we can create our user and exit the MySQL monitor: