Home Blog Archive Software Debian: MySQL install and setup - how to

Debian: MySQL install and setup - how to

  • Oct 29, 2025
  • 666
  • 0

To use a web server under Debian Linux, you will need MySQL. You will learn in this tip how to install this under Debian and set up.

MySQL on Debian to install and set up – so it works

  1. Log in to Debian as the Administrator and open the Terminal.
  2. With "sudo apt-get install mysql-server" will be downloaded MySQL and the Installation will be started. Just follow the instructions.
  3. The Installation is complete, you must assign a password. You can use "mysqladmin -u root -p password "PASSWORD"" and change "PASSWORD" with a desired password.
  4. Now you can log in with "mysql-u root-p" and entering the previously set password in MySQL.
  5. With the command "create database if not exists database name;" create a new database with the name "database name", you can customize arbitrary.
  6. This database now has a user with the password "secret".
  7. create user 'www-data'@'localhost' identified by 'secret';
  8. grant usage on *.* to 'www-data'@'localhost' identified by 'secret';
Debian: MySQL setup

Further steps: install MySQL and set up

  1. Thus, the user receives the appropriate access, enter the following command:
  2. grant all privileges on database name.* to 'www-data'@'localhost';
  3. flush privileges;
  4. With "quit" or "exit" to exit the configuration. Then, use "sudo systemctl restart mysql.service", to start the MySQL Server and apply the Changes.
  5. With the command "create database if not exists database name;" create a new database with the name "database name", you can customize arbitrary.
  6. This database now has a user with the password "secret".
  7. create user 'www-data'@'localhost' identified by 'secret';
  8. grant usage on *.* to 'www-data'@'localhost' identified by 'secret';
You want to in addition, under Linux Debian a FTP Server set up, we will show you in the next practice tip on how to do this.

YOU MAY ALSO LIKE

0 COMMENTS

LEAVE A COMMENT

Human?
1 + 3 =