1. Install MySQL: sudo apt install mysql-server (Ubuntu) or yum install mariadb-server (CentOS)

  2. Start service: systemctl start mysql or systemctl start mariadb

  3. Run secure script: mysql_secure_installation

  4. Create user and database:

    CREATE DATABASE mydb;
    CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'mypassword';
    GRANT ALL PRIVILEGES ON mydb.* TO 'myuser'@'localhost';
    FLUSH PRIVILEGES;
  5. Configure remote access if needed and use a firewall to limit access.

Was this answer helpful? 0 Users Found This Useful (0 Votes)