I have LAMP installed on Ubuntu 20.4. I want to install a script that requires use of a MySQL database. I want to set up a separate/distinct database for a particular domain where the script will be installed. The database has t be setup before installation.
How do I do that? What are the commands?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello,
You can do that by following the instructions from step 3 here:
Basically, once you’ve SSHed on the server, you first access MySQL with the following command:
sudo mysql
Then you can create a new database with:
CREATE DATABASE your_db_name;
And then if you want to create a separate user for that too, you can follow the steps from the tutorial.
Let me know if you have any questions!
Best,
Bobby